aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorColin Percival <cperciva@FreeBSD.org>2004-08-06 02:44:58 +0000
committerColin Percival <cperciva@FreeBSD.org>2004-08-06 02:44:58 +0000
commit0413bacd091577bed3dfe23da5647b0280f5b1b2 (patch)
treea4cd470532fe8d22706ca632c5c81b02e380eb2a /sys
parent9c1df6951ff968a632f4c6d04de59842857a9ec9 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_timeout.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c
index 031283cb2c53e..eac675bf7f68b 100644
--- a/sys/kern/kern_timeout.c
+++ b/sys/kern/kern_timeout.c
@@ -401,8 +401,22 @@ callout_reset(c, to_ticks, ftn, arg)
mtx_unlock_spin(&callout_lock);
return;
}
- if (c->c_flags & CALLOUT_PENDING)
- callout_stop(c);
+ if (c->c_flags & CALLOUT_PENDING) {
+ if (nextsoftcheck == c) {
+ nextsoftcheck = TAILQ_NEXT(c, c_links.tqe);
+ }
+ TAILQ_REMOVE(&callwheel[c->c_time & callwheelmask], c,
+ c_links.tqe);
+
+ /*
+ * Part of the normal "stop a pending callout" process
+ * is to clear the CALLOUT_ACTIVE and CALLOUT_PENDING
+ * flags. We're not going to bother doing that here,
+ * because we're going to be setting those flags ten lines
+ * after this point, and we're holding callout_lock
+ * between now and then.
+ */
+ }
/*
* We could unlock callout_lock here and lock it again before the