Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136957114
D26285.id76507.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D26285.id76507.diff
View Options
Index: sys/kern/kern_timeout.c
===================================================================
--- sys/kern/kern_timeout.c
+++ sys/kern/kern_timeout.c
@@ -1075,6 +1075,9 @@
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c->c_lock,
"calling %s", __func__);
+ KASSERT((flags & CS_DRAIN) == 0 || drain == NULL,
+ ("Cannot set drain callback when CS_DRAIN flag is set"));
+
/*
* Some old subsystems don't hold Giant while running a callout_stop(),
* so just discard this check for the moment.
@@ -1270,11 +1273,12 @@
}
CC_UNLOCK(cc);
return ((flags & CS_EXECUTING) != 0);
- }
- CTR3(KTR_CALLOUT, "failed to stop %p func %p arg %p",
- c, c->c_func, c->c_arg);
- if (drain) {
- cc_exec_drain(cc, direct) = drain;
+ } else {
+ CTR3(KTR_CALLOUT, "failed to stop %p func %p arg %p",
+ c, c->c_func, c->c_arg);
+ if (drain) {
+ cc_exec_drain(cc, direct) = drain;
+ }
}
KASSERT(!sq_locked, ("sleepqueue chain still locked"));
cancelled = ((flags & CS_EXECUTING) != 0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 21, 8:15 PM (11 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25767669
Default Alt Text
D26285.id76507.diff (1 KB)
Attached To
Mode
D26285: Micro optimise _callout_stop_safe() by removing dead code.
Attached
Detach File
Event Timeline
Log In to Comment