diff options
author | Randall Stewart <rrs@FreeBSD.org> | 2015-11-13 22:51:35 +0000 |
---|---|---|
committer | Randall Stewart <rrs@FreeBSD.org> | 2015-11-13 22:51:35 +0000 |
commit | 7c4676ddee36407ec4c40d4311b79cbd17d1da6e (patch) | |
tree | 8d27e0d0e4a2ccb1fcf414f3765ec6a6e6de9611 /sys/kern/subr_taskqueue.c | |
parent | 2224fae179e150ac79fe3528e21b66e673cd3d40 (diff) | |
download | src-7c4676ddee36407ec4c40d4311b79cbd17d1da6e.tar.gz src-7c4676ddee36407ec4c40d4311b79cbd17d1da6e.zip |
This fixes several places where callout_stops return is examined. The
new return codes of -1 were mistakenly being considered "true". Callout_stop
now returns -1 to indicate the callout had either already completed or
was not running and 0 to indicate it could not be stopped. Also update
the manual page to make it more consistent no non-zero in the callout_stop
or callout_reset descriptions.
MFC after: 1 Month with associated callout change.
Notes
Notes:
svn path=/head/; revision=290805
Diffstat (limited to 'sys/kern/subr_taskqueue.c')
-rw-r--r-- | sys/kern/subr_taskqueue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_taskqueue.c b/sys/kern/subr_taskqueue.c index f0a5a1ba85e4..c90d0e261027 100644 --- a/sys/kern/subr_taskqueue.c +++ b/sys/kern/subr_taskqueue.c @@ -496,7 +496,7 @@ taskqueue_cancel_timeout(struct taskqueue *queue, int error; TQ_LOCK(queue); - pending = !!callout_stop(&timeout_task->c); + pending = !!(callout_stop(&timeout_task->c) > 0); error = taskqueue_cancel_locked(queue, &timeout_task->t, &pending1); if ((timeout_task->f & DT_CALLOUT_ARMED) != 0) { timeout_task->f &= ~DT_CALLOUT_ARMED; |