summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_timeout.c5
-rw-r--r--sys/sys/callout.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index a8813c1..4f88bab 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -259,7 +259,7 @@ callout_reset(c, to_ticks, ftn, arg)
mtx_unlock_spin(&callout_lock);
}
-void
+int
callout_stop(c)
struct callout *c;
{
@@ -271,7 +271,7 @@ callout_stop(c)
if (!(c->c_flags & CALLOUT_PENDING)) {
c->c_flags &= ~CALLOUT_ACTIVE;
mtx_unlock_spin(&callout_lock);
- return;
+ return (0);
}
c->c_flags &= ~(CALLOUT_ACTIVE | CALLOUT_PENDING);
@@ -285,6 +285,7 @@ callout_stop(c)
SLIST_INSERT_HEAD(&callfree, c, c_links.sle);
}
mtx_unlock_spin(&callout_lock);
+ return (1);
}
void
diff --git a/sys/sys/callout.h b/sys/sys/callout.h
index 9eecb44..692cd78 100644
--- a/sys/sys/callout.h
+++ b/sys/sys/callout.h
@@ -80,7 +80,7 @@ extern struct mtx callout_lock;
void callout_init __P((struct callout *, int));
#define callout_pending(c) ((c)->c_flags & CALLOUT_PENDING)
void callout_reset __P((struct callout *, int, void (*)(void *), void *));
-void callout_stop __P((struct callout *));
+int callout_stop __P((struct callout *));
#endif
OpenPOWER on IntegriCloud