summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2004-03-16 18:56:22 +0000
committerjhb <jhb@FreeBSD.org>2004-03-16 18:56:22 +0000
commit71c3a1c44c43ab6da664e5414fb5ae531038d5c5 (patch)
tree9c296459f49a9d11f141fb55cf9e9962e8f58e72 /sys/kern
parentd54678864e62ad9cea72b1d3f48b4fe35a0ce249 (diff)
downloadFreeBSD-src-71c3a1c44c43ab6da664e5414fb5ae531038d5c5.zip
FreeBSD-src-71c3a1c44c43ab6da664e5414fb5ae531038d5c5.tar.gz
Remove a bogus assertion and readd it in a more correct location. A thread
might be enqueued on a sleep queue but not be asleep when the timeout fires if it is blocked on a lock trying to check for pending signals before going to sleep. In the case of fixing up the TDF_TIMEOUT race, however, the thread must be marked asleep. Reported by: kan (the bogus one)
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/subr_sleepqueue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c
index 1dc3409..36f6850 100644
--- a/sys/kern/subr_sleepqueue.c
+++ b/sys/kern/subr_sleepqueue.c
@@ -667,7 +667,6 @@ sleepq_timeout(void *arg)
* synchronize with this function.
*/
if (TD_ON_SLEEPQ(td)) {
- MPASS(TD_IS_SLEEPING(td));
MPASS(td->td_wchan == wchan);
MPASS(sq != NULL);
td->td_flags |= TDF_TIMEOUT;
@@ -688,6 +687,7 @@ sleepq_timeout(void *arg)
* need to be canceled.
*/
if (td->td_flags & TDF_TIMEOUT) {
+ MPASS(TD_IS_SLEEPING(td));
td->td_flags &= ~TDF_TIMEOUT;
TD_CLR_SLEEPING(td);
setrunnable(td);
OpenPOWER on IntegriCloud