summaryrefslogtreecommitdiffstats
path: root/sys/sys/callout.h
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/sys/callout.h
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/sys/callout.h')
-rw-r--r--sys/sys/callout.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/sys/callout.h b/sys/sys/callout.h
index a90285f..a46055e 100644
--- a/sys/sys/callout.h
+++ b/sys/sys/callout.h
@@ -79,9 +79,16 @@ extern struct mtx callout_lock;
#define callout_deactivate(c) ((c)->c_flags &= ~CALLOUT_ACTIVE)
void callout_init __P((struct callout *));
#define callout_pending(c) ((c)->c_flags & CALLOUT_PENDING)
-void callout_reset __P((struct callout *, int, void (*)(void *), void *));
+void _callout_reset __P((struct callout *, int, void (*)(void *), void *,
+ int));
void callout_stop __P((struct callout *));
+#define callout_reset(c, ticks, func, arg) \
+ _callout_reset((c), (ticks), (func), (arg), 0)
+
+#define mp_callout_reset(c, ticks, func, arg) \
+ _callout_reset((c), (ticks), (func), (arg), CALLOUT_MPSAFE)
+
#endif
#endif /* _SYS_CALLOUT_H_ */
OpenPOWER on IntegriCloud