summaryrefslogtreecommitdiffstats
path: root/sys/sys/callout.h
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2015-01-22 11:12:42 +0000
committerhselasky <hselasky@FreeBSD.org>2015-01-22 11:12:42 +0000
commitc0aba3b50d494dc9fefa1cd1304481521fa05a36 (patch)
tree499d9197fe4fbf2671c76f17e92abf2f0cf51d05 /sys/sys/callout.h
parent8925dffab199f6ca4955328774e9fa6d39e9f0c8 (diff)
downloadFreeBSD-src-c0aba3b50d494dc9fefa1cd1304481521fa05a36.zip
FreeBSD-src-c0aba3b50d494dc9fefa1cd1304481521fa05a36.tar.gz
Revert for r277213:
FreeBSD developers need more time to review patches in the surrounding areas like the TCP stack which are using MPSAFE callouts to restore distribution of callouts on multiple CPUs. Bump the __FreeBSD_version instead of reverting it. Suggested by: kmacy, adrian, glebius and kib Differential Revision: https://reviews.freebsd.org/D1438
Diffstat (limited to 'sys/sys/callout.h')
-rw-r--r--sys/sys/callout.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/sys/callout.h b/sys/sys/callout.h
index 235da99..1096cb2 100644
--- a/sys/sys/callout.h
+++ b/sys/sys/callout.h
@@ -45,12 +45,10 @@
#define CALLOUT_PENDING 0x0004 /* callout is waiting for timeout */
#define CALLOUT_MPSAFE 0x0008 /* callout handler is mp safe */
#define CALLOUT_RETURNUNLOCKED 0x0010 /* handler returns with mtx unlocked */
-#define CALLOUT_UNUSED_5 0x0020 /* --available-- */
-#define CALLOUT_DEFRESTART 0x0040 /* callout restart is deferred */
+#define CALLOUT_SHAREDLOCK 0x0020 /* callout lock held in shared mode */
+#define CALLOUT_DFRMIGRATION 0x0040 /* callout in deferred migration mode */
#define CALLOUT_PROCESSED 0x0080 /* callout in wheel or processing list? */
#define CALLOUT_DIRECT 0x0100 /* allow exec from hw int context */
-#define CALLOUT_SET_LC(x) (((x) & 7) << 16) /* set lock class */
-#define CALLOUT_GET_LC(x) (((x) >> 16) & 7) /* get lock class */
#define C_DIRECT_EXEC 0x0001 /* direct execution of callout */
#define C_PRELBITS 7
@@ -67,8 +65,7 @@ struct callout_handle {
#ifdef _KERNEL
#define callout_active(c) ((c)->c_flags & CALLOUT_ACTIVE)
#define callout_deactivate(c) ((c)->c_flags &= ~CALLOUT_ACTIVE)
-int callout_drain(struct callout *);
-int callout_drain_async(struct callout *, callout_func_t *, void *);
+#define callout_drain(c) _callout_stop_safe(c, 1)
void callout_init(struct callout *, int);
void _callout_init_lock(struct callout *, struct lock_object *, int);
#define callout_init_mtx(c, mtx, flags) \
@@ -82,7 +79,7 @@ void _callout_init_lock(struct callout *, struct lock_object *, int);
NULL, (flags))
#define callout_pending(c) ((c)->c_flags & CALLOUT_PENDING)
int callout_reset_sbt_on(struct callout *, sbintime_t, sbintime_t,
- callout_func_t *, void *, int, int);
+ void (*)(void *), void *, int, int);
#define callout_reset_sbt(c, sbt, pr, fn, arg, flags) \
callout_reset_sbt_on((c), (sbt), (pr), (fn), (arg), (c)->c_cpu, (flags))
#define callout_reset_sbt_curcpu(c, sbt, pr, fn, arg, flags) \
@@ -106,7 +103,8 @@ int callout_schedule(struct callout *, int);
int callout_schedule_on(struct callout *, int, int);
#define callout_schedule_curcpu(c, on_tick) \
callout_schedule_on((c), (on_tick), PCPU_GET(cpuid))
-int callout_stop(struct callout *);
+#define callout_stop(c) _callout_stop_safe(c, 0)
+int _callout_stop_safe(struct callout *, int);
void callout_process(sbintime_t now);
#endif
OpenPOWER on IntegriCloud