diff options
author | jhb <jhb@FreeBSD.org> | 2013-03-01 22:03:31 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2013-03-01 22:03:31 +0000 |
commit | 8857575b13cf118cc89efb1b462dd314df09c180 (patch) | |
tree | 5508497f5efa7add0b4f3b7a364b4d8c9bab98be /sys/kern/subr_sleepqueue.c | |
parent | 0542e230f823d21b65362dd6575a212e82d79bf5 (diff) | |
download | FreeBSD-src-8857575b13cf118cc89efb1b462dd314df09c180.zip FreeBSD-src-8857575b13cf118cc89efb1b462dd314df09c180.tar.gz |
Replace the TDP_NOSLEEPING flag with a counter so that the
THREAD_NO_SLEEPING() and THREAD_SLEEPING_OK() macros can nest.
Reviewed by: attilio
Diffstat (limited to 'sys/kern/subr_sleepqueue.c')
-rw-r--r-- | sys/kern/subr_sleepqueue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c index b6bd8fc..f187544 100644 --- a/sys/kern/subr_sleepqueue.c +++ b/sys/kern/subr_sleepqueue.c @@ -296,8 +296,8 @@ sleepq_add(void *wchan, struct lock_object *lock, const char *wmesg, int flags, MPASS((queue >= 0) && (queue < NR_SLEEPQS)); /* If this thread is not allowed to sleep, die a horrible death. */ - KASSERT(!(td->td_pflags & TDP_NOSLEEPING), - ("%s: td %p to sleep on wchan %p with TDP_NOSLEEPING on", + KASSERT(td->td_no_sleeping == 0, + ("%s: td %p to sleep on wchan %p with sleeping prohibited", __func__, td, wchan)); /* Look up the sleep queue associated with the wait channel 'wchan'. */ |