aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_turnstile.c
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2012-09-12 22:10:53 +0000
committerAttilio Rao <attilio@FreeBSD.org>2012-09-12 22:10:53 +0000
commite3ae0dfe694c2c457ffa1fb92036bdae74db8c76 (patch)
tree139a9f57a8c17d9b87a87568fbf9be1819e671f0 /sys/kern/subr_turnstile.c
parentfaa1082aa2b2b3968f34095709ac5d58944833f9 (diff)
downloadsrc-e3ae0dfe694c2c457ffa1fb92036bdae74db8c76.tar.gz
src-e3ae0dfe694c2c457ffa1fb92036bdae74db8c76.zip
Improve check coverage about idle threads.
Idle threads are not allowed to acquire any lock but spinlocks. Deny any attempt to do so by panicing at the locking operation when INVARIANTS is on. Then, remove the check on blocking on a turnstile. The check in sleepqueues is left because they are not allowed to use tsleep() either which could happen still. Reviewed by: bde, jhb, kib MFC after: 1 week
Notes
Notes: svn path=/head/; revision=240424
Diffstat (limited to 'sys/kern/subr_turnstile.c')
-rw-r--r--sys/kern/subr_turnstile.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c
index 31d16fe29128..76fb96400362 100644
--- a/sys/kern/subr_turnstile.c
+++ b/sys/kern/subr_turnstile.c
@@ -684,7 +684,6 @@ turnstile_wait(struct turnstile *ts, struct thread *owner, int queue)
if (owner)
MPASS(owner->td_proc->p_magic == P_MAGIC);
MPASS(queue == TS_SHARED_QUEUE || queue == TS_EXCLUSIVE_QUEUE);
- KASSERT(!TD_IS_IDLETHREAD(td), ("idle threads cannot block on locks"));
/*
* If the lock does not already have a turnstile, use this thread's