summaryrefslogtreecommitdiffstats
path: root/sys/sys
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2016-03-15 17:09:27 +0000
committerkib <kib@FreeBSD.org>2016-03-15 17:09:27 +0000
commite229f36ff4b720e42340e1049c3166d48b79e8a1 (patch)
tree7c95b03a9e587e4b10f1a95c27379aa848e85c89 /sys/sys
parentfee3cb025c670b69d1172fd3dc45254953bd8309 (diff)
downloadFreeBSD-src-e229f36ff4b720e42340e1049c3166d48b79e8a1.zip
FreeBSD-src-e229f36ff4b720e42340e1049c3166d48b79e8a1.tar.gz
MFC r296320:
Adjust _callout_stop_safe() return value for the subr_sleepqueue.c needs when migrating callout was blocked, but running one was not. PR: 200992 Approved by: re (marius)
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/callout.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/sys/callout.h b/sys/sys/callout.h
index 6e18ae7..d3f2bca 100644
--- a/sys/sys/callout.h
+++ b/sys/sys/callout.h
@@ -62,6 +62,12 @@ struct callout_handle {
struct callout *callout;
};
+/* Flags for callout_stop_safe() */
+#define CS_DRAIN 0x0001 /* callout_drain(), wait allowed */
+#define CS_MIGRBLOCK 0x0002 /* Block migration, return value
+ indicates that the callout was
+ executing */
+
#ifdef _KERNEL
/*
* Note the flags field is actually *two* fields. The c_flags
@@ -81,7 +87,7 @@ struct callout_handle {
*/
#define callout_active(c) ((c)->c_flags & CALLOUT_ACTIVE)
#define callout_deactivate(c) ((c)->c_flags &= ~CALLOUT_ACTIVE)
-#define callout_drain(c) _callout_stop_safe(c, 1)
+#define callout_drain(c) _callout_stop_safe(c, CS_DRAIN)
void callout_init(struct callout *, int);
void _callout_init_lock(struct callout *, struct lock_object *, int);
#define callout_init_mtx(c, mtx, flags) \
OpenPOWER on IntegriCloud