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.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/sys/sys/_callout.h b/sys/sys/_callout.h
index f58a383..e186aec 100644
--- a/sys/sys/_callout.h
+++ b/sys/sys/_callout.h
@@ -46,30 +46,19 @@ LIST_HEAD(callout_list, callout);
SLIST_HEAD(callout_slist, callout);
TAILQ_HEAD(callout_tailq, callout);
-typedef void callout_func_t(void *);
-
-struct callout_args {
- sbintime_t time; /* absolute time for the event */
- sbintime_t precision; /* delta allowed wrt opt */
- void *arg; /* function argument */
- callout_func_t *func; /* function to call */
- int flags; /* flags passed to callout_reset() */
- int cpu; /* CPU we're scheduled on */
-};
-
struct callout {
union {
LIST_ENTRY(callout) le;
SLIST_ENTRY(callout) sle;
TAILQ_ENTRY(callout) tqe;
} c_links;
- sbintime_t c_time; /* absolute time for the event */
+ sbintime_t c_time; /* ticks to the event */
sbintime_t c_precision; /* delta allowed wrt opt */
void *c_arg; /* function argument */
- callout_func_t *c_func; /* function to call */
- struct lock_object *c_lock; /* callback lock */
+ void (*c_func)(void *); /* function to call */
+ struct lock_object *c_lock; /* lock to handle */
int c_flags; /* state of this entry */
- int c_cpu; /* CPU we're scheduled on */
+ volatile int c_cpu; /* CPU we're scheduled on */
};
#endif
OpenPOWER on IntegriCloud