diff options
author | jeff <jeff@FreeBSD.org> | 2008-04-06 11:08:49 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2008-04-06 11:08:49 +0000 |
commit | d1c199f415e2039c9489e2dd652adf508d9ec821 (patch) | |
tree | 7b8d61acb466adf81e639e74ad299776be14448c /sys/kern | |
parent | 9fe523332b8715edc3e8c616e1b367a57afac7d1 (diff) | |
download | FreeBSD-src-d1c199f415e2039c9489e2dd652adf508d9ec821.zip FreeBSD-src-d1c199f415e2039c9489e2dd652adf508d9ec821.tar.gz |
- Correct a major error introduced in the per-cpu timeout commit. Sleep
and wakeup require the same wait channel to function properly.
Found by: kris
Pointy hat: me
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_timeout.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index b187ab7..fc30bd8 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -655,7 +655,7 @@ again: c, c->c_func, c->c_arg); CC_UNLOCK(cc); if (sq_locked) - sleepq_release(&cc->cc_curr); + sleepq_release(&cc->cc_waiting); return (0); } @@ -687,17 +687,17 @@ again: */ if (!sq_locked) { CC_UNLOCK(cc); - sleepq_lock(&cc->cc_curr); + sleepq_lock(&cc->cc_waiting); sq_locked = 1; goto again; } cc->cc_waiting = 1; DROP_GIANT(); CC_UNLOCK(cc); - sleepq_add(&cc->cc_curr, + sleepq_add(&cc->cc_waiting, &cc->cc_lock.lock_object, "codrain", SLEEPQ_SLEEP, 0); - sleepq_wait(&cc->cc_curr, 0); + sleepq_wait(&cc->cc_waiting, 0); sq_locked = 0; /* Reacquire locks previously released. */ @@ -726,7 +726,7 @@ again: return (0); } if (sq_locked) - sleepq_release(&cc->cc_curr); + sleepq_release(&cc->cc_waiting); c->c_flags &= ~(CALLOUT_ACTIVE | CALLOUT_PENDING); |