aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/kern_timeout.c
diff options
context:
space:
mode:
authorJonathan Lemon <jlemon@FreeBSD.org>2000-11-25 06:22:16 +0000
committerJonathan Lemon <jlemon@FreeBSD.org>2000-11-25 06:22:16 +0000
commite82ac18e526c19effc5dbbde65a9253a41919802 (patch)
tree4ccdfb1db9a4af2b6ec85d15717c676537902006 /sys/kern/kern_timeout.c
parent6e47e42f8d2bea2df54b6cd1bcac84aaf06af791 (diff)
downloadsrc-e82ac18e526c19effc5dbbde65a9253a41919802.tar.gz
src-e82ac18e526c19effc5dbbde65a9253a41919802.zip
Revert the last commit to the callout interface, and add a flag to
callout_init() indicating whether the callout is safe or not. Update the callers of callout_init() to reflect the new interface. Okayed by: Jake
Notes
Notes: svn path=/head/; revision=69147
Diffstat (limited to 'sys/kern/kern_timeout.c')
-rw-r--r--sys/kern/kern_timeout.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index 72b5302fd32c..5576e0872fc9 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -173,7 +173,7 @@ struct callout_handle
timeout(ftn, arg, to_ticks)
timeout_t *ftn;
void *arg;
- register int to_ticks;
+ int to_ticks;
{
int s;
struct callout *new;
@@ -242,12 +242,11 @@ callout_handle_init(struct callout_handle *handle)
* callout_deactivate() - marks the callout as having been serviced
*/
void
-_callout_reset(c, to_ticks, ftn, arg, flags)
+callout_reset(c, to_ticks, ftn, arg)
struct callout *c;
int to_ticks;
void (*ftn) __P((void *));
void *arg;
- int flags;
{
int s;
@@ -265,8 +264,7 @@ _callout_reset(c, to_ticks, ftn, arg, flags)
to_ticks = 1;
c->c_arg = arg;
- c->c_flags |= (CALLOUT_ACTIVE | CALLOUT_PENDING |
- (flags & CALLOUT_MPSAFE));
+ c->c_flags |= (CALLOUT_ACTIVE | CALLOUT_PENDING);
c->c_func = ftn;
c->c_time = ticks + to_ticks;
TAILQ_INSERT_TAIL(&callwheel[c->c_time & callwheelmask],
@@ -308,10 +306,13 @@ callout_stop(c)
}
void
-callout_init(c)
+callout_init(c, mpsafe)
struct callout *c;
+ int mpsafe;
{
bzero(c, sizeof *c);
+ if (mpsafe)
+ c->c_flags |= CALLOUT_MPSAFE;
}
#ifdef APM_FIXUP_CALLTODO