svn commit: r303098 - head/sys/kern
Gleb Smirnoff
glebius at FreeBSD.org
Wed Jul 20 16:48:27 UTC 2016
Author: glebius
Date: Wed Jul 20 16:48:25 2016
New Revision: 303098
URL: https://svnweb.freebsd.org/changeset/base/303098
Log:
Redo the r302894: the very new value for a non-scheduled callout is -1.
This was recently added in r290664.
Noticed by: hselasky
Tested by: Larry Rosenman <ler lerctr.org>
PR: 210884
Modified:
head/sys/kern/kern_timeout.c
Modified: head/sys/kern/kern_timeout.c
==============================================================================
--- head/sys/kern/kern_timeout.c Wed Jul 20 16:46:13 2016 (r303097)
+++ head/sys/kern/kern_timeout.c Wed Jul 20 16:48:25 2016 (r303098)
@@ -1380,8 +1380,14 @@ again:
if ((c->c_iflags & CALLOUT_PENDING) == 0) {
CTR3(KTR_CALLOUT, "failed to stop %p func %p arg %p",
c, c->c_func, c->c_arg);
+ /*
+ * For not scheduled and not executing callout return
+ * negative value.
+ */
+ if (cc_exec_curr(cc, direct) != c)
+ cancelled = -1;
CC_UNLOCK(cc);
- return (0);
+ return (cancelled);
}
c->c_iflags &= ~CALLOUT_PENDING;
More information about the svn-src-all
mailing list