Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_log.c
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | |||||
int log_open; /* also used in log() */ | int log_open; /* also used in log() */ | ||||
static struct cv log_wakeup; | static struct cv log_wakeup; | ||||
struct mtx msgbuf_lock; | struct mtx msgbuf_lock; | ||||
MTX_SYSINIT(msgbuf_lock, &msgbuf_lock, "msgbuf lock", MTX_DEF); | MTX_SYSINIT(msgbuf_lock, &msgbuf_lock, "msgbuf lock", MTX_DEF); | ||||
/* Times per second to check for a pending syslog wakeup. */ | /* Times per second to check for a pending syslog wakeup. */ | ||||
static int log_wakeups_per_second = 5; | static int log_wakeups_per_second = 5; | ||||
SYSCTL_INT(_kern, OID_AUTO, log_wakeups_per_second, CTLFLAG_RW, | SYSCTL_INT(_kern, OID_AUTO, log_wakeups_per_second, CTLFLAG_RW, | ||||
&log_wakeups_per_second, 0, ""); | &log_wakeups_per_second, 0, | ||||
"Times per second to check for syslog wakeup"); | |||||
/*ARGSUSED*/ | /*ARGSUSED*/ | ||||
static int | static int | ||||
logopen(struct cdev *dev, int flags, int mode, struct thread *td) | logopen(struct cdev *dev, int flags, int mode, struct thread *td) | ||||
{ | { | ||||
if (log_wakeups_per_second < 1) { | if (log_wakeups_per_second < 1) { | ||||
printf("syslog wakeup is less than one. Adjusting to 1.\n"); | printf("syslog wakeup is less than one. Adjusting to 1.\n"); | ||||
▲ Show 20 Lines • Show All 200 Lines • Show Last 20 Lines |