summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_timeout.c
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2000-11-25 03:34:49 +0000
committerjake <jake@FreeBSD.org>2000-11-25 03:34:49 +0000
commita177d57cb0bf5d68c28a8d74c9638eb4c906e656 (patch)
treeff3f9646036275aa9e0b94aa5eb96719db8d4681 /sys/kern/kern_timeout.c
parent87f2317296902dad6bb412e91d2fc95483ec305e (diff)
downloadFreeBSD-src-a177d57cb0bf5d68c28a8d74c9638eb4c906e656.zip
FreeBSD-src-a177d57cb0bf5d68c28a8d74c9638eb4c906e656.tar.gz
- Rename callout_reset to _callout_reset and add a flags argument.
- Add macros callout_reset, which does the obvious, and mp_callout_reset, which passes the CALLOUT_MPSAFE flag.
Diffstat (limited to 'sys/kern/kern_timeout.c')
-rw-r--r--sys/kern/kern_timeout.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index 57be762..72b5302 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -242,11 +242,12 @@ callout_handle_init(struct callout_handle *handle)
* callout_deactivate() - marks the callout as having been serviced
*/
void
-callout_reset(c, to_ticks, ftn, arg)
+_callout_reset(c, to_ticks, ftn, arg, flags)
struct callout *c;
int to_ticks;
void (*ftn) __P((void *));
void *arg;
+ int flags;
{
int s;
@@ -264,7 +265,8 @@ callout_reset(c, to_ticks, ftn, arg)
to_ticks = 1;
c->c_arg = arg;
- c->c_flags |= (CALLOUT_ACTIVE | CALLOUT_PENDING);
+ c->c_flags |= (CALLOUT_ACTIVE | CALLOUT_PENDING |
+ (flags & CALLOUT_MPSAFE));
c->c_func = ftn;
c->c_time = ticks + to_ticks;
TAILQ_INSERT_TAIL(&callwheel[c->c_time & callwheelmask],
OpenPOWER on IntegriCloud