| 230 | } |
| 231 | |
| 232 | static void |
| 233 | logtimeout(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); |
| 246 | done: |
| 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*/ |
| 256 | static int |
nothing calls this directly
no test coverage detected