Deleted Added
sdiff udiff text old ( 116182 ) new ( 116634 )
full compact
1/*
2 * Copyright (c) 1982, 1986, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 24 unchanged lines hidden (view full) ---

33 * @(#)subr_log.c 8.1 (Berkeley) 6/10/93
34 */
35
36/*
37 * Error log buffer for kernel printf's.
38 */
39
40#include <sys/cdefs.h>
41__FBSDID("$FreeBSD: head/sys/kern/subr_log.c 116182 2003-06-11 00:56:59Z obrien $");
42
43#include <sys/param.h>
44#include <sys/systm.h>
45#include <sys/conf.h>
46#include <sys/proc.h>
47#include <sys/vnode.h>
48#include <sys/filio.h>
49#include <sys/ttycom.h>

--- 46 unchanged lines hidden (view full) ---

96static int
97logopen(dev_t dev, int flags, int mode, struct thread *td)
98{
99 if (log_open)
100 return (EBUSY);
101 log_open = 1;
102 callout_init(&logsoftc.sc_callout, 0);
103 fsetown(td->td_proc->p_pid, &logsoftc.sc_sigio); /* signal process only */
104 callout_reset(&logsoftc.sc_callout, hz / log_wakeups_per_second,
105 logtimeout, NULL);
106 return (0);
107}
108
109/*ARGSUSED*/
110static int
111logclose(dev_t dev, int flag, int mode, struct thread *td)

--- 66 unchanged lines hidden (view full) ---

178}
179
180static void
181logtimeout(void *arg)
182{
183
184 if (!log_open)
185 return;
186 if (msgbuftrigger == 0) {
187 callout_reset(&logsoftc.sc_callout,
188 hz / log_wakeups_per_second, logtimeout, NULL);
189 return;
190 }
191 msgbuftrigger = 0;
192 selwakeup(&logsoftc.sc_selp);
193 if ((logsoftc.sc_state & LOG_ASYNC) && logsoftc.sc_sigio != NULL)

--- 67 unchanged lines hidden ---