Page MenuHomeFreeBSD

D3078.id8254.diff
No OneTemporary

D3078.id8254.diff

Index: sys/kern/kern_timeout.c
===================================================================
--- sys/kern/kern_timeout.c
+++ sys/kern/kern_timeout.c
@@ -1151,6 +1151,7 @@
struct lock_class *class;
int direct, sq_locked, use_lock;
int not_on_a_list;
+ int not_running = 1;
if (safe)
WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c->c_lock,
@@ -1378,8 +1379,17 @@
}
}
callout_cc_del(c, cc);
+
+ if (!use_lock) {
+ /*
+ * If we are asked to stop a callout which is currently in progress
+ * and indeed impossible to stop then return 0.
+ */
+ not_running = !(cc_exec_curr(cc, direct) == c);
+ }
+
CC_UNLOCK(cc);
- return (1);
+ return (not_running);
}
void

File Metadata

Mime Type
text/plain
Expires
Tue, Mar 17, 1:49 PM (2 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29828076
Default Alt Text
D3078.id8254.diff (690 B)

Event Timeline