MCPcopy Create free account
hub / github.com/F-Stack/f-stack / logtimeout

Function logtimeout

freebsd/kern/subr_log.c:232–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232static void
233logtimeout(void *arg)
234{
235
236 if (!log_open)
237 return;
238 if (msgbuftrigger == 0)
239 goto done;
240 msgbuftrigger = 0;
241 selwakeuppri(&logsoftc.sc_selp, LOG_RDPRI);
242 KNOTE_LOCKED(&logsoftc.sc_selp.si_note, 0);
243 if ((logsoftc.sc_state & LOG_ASYNC) && logsoftc.sc_sigio != NULL)
244 pgsigio(&logsoftc.sc_sigio, SIGIO, 0);
245 cv_broadcastpri(&log_wakeup, LOG_RDPRI);
246done:
247 if (log_wakeups_per_second < 1) {
248 printf("syslog wakeup is less than one. Adjusting to 1.\n");
249 log_wakeups_per_second = 1;
250 }
251 callout_reset_sbt(&logsoftc.sc_callout,
252 SBT_1S / log_wakeups_per_second, 0, logtimeout, NULL, C_PREL(1));
253}
254
255/*ARGSUSED*/
256static int

Callers

nothing calls this directly

Calls 4

selwakeuppriFunction · 0.85
pgsigioFunction · 0.70
cv_broadcastpriFunction · 0.70
printfFunction · 0.70

Tested by

no test coverage detected