aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_sleepqueue.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2013-03-01 22:03:31 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2013-03-01 22:03:31 +0000
commitf9379dc4118730b9fc82afb5ae62de6b0fd6dd3b (patch)
tree5508497f5efa7add0b4f3b7a364b4d8c9bab98be /sys/kern/subr_sleepqueue.c
parent5f61931668e0826d885e501456e11dae34c6732c (diff)
downloadsrc-f9379dc4118730b9fc82afb5ae62de6b0fd6dd3b.tar.gz
src-f9379dc4118730b9fc82afb5ae62de6b0fd6dd3b.zip
Replace the TDP_NOSLEEPING flag with a counter so that the
THREAD_NO_SLEEPING() and THREAD_SLEEPING_OK() macros can nest. Reviewed by: attilio
Notes
Notes: svn path=/head/; revision=247588
Diffstat (limited to 'sys/kern/subr_sleepqueue.c')
-rw-r--r--sys/kern/subr_sleepqueue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c
index b6bd8fcc8842..f1875446ab8f 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'. */