diff options
author | Attilio Rao <attilio@FreeBSD.org> | 2012-09-12 22:10:53 +0000 |
---|---|---|
committer | Attilio Rao <attilio@FreeBSD.org> | 2012-09-12 22:10:53 +0000 |
commit | e3ae0dfe694c2c457ffa1fb92036bdae74db8c76 (patch) | |
tree | 139a9f57a8c17d9b87a87568fbf9be1819e671f0 /sys/kern/subr_turnstile.c | |
parent | faa1082aa2b2b3968f34095709ac5d58944833f9 (diff) | |
download | src-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.c | 1 |
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 |