diff options
author | jhb <jhb@FreeBSD.org> | 2011-05-24 13:17:08 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2011-05-24 13:17:08 +0000 |
commit | d73862793bc31f12208c877a64fee924896b3d1b (patch) | |
tree | 7b69ad3d12cd9c835e482f5cf8424817ef5458ff /sys/kern | |
parent | 08101b4867765d4080cc8b5ee02dcebca5ed87d5 (diff) | |
download | FreeBSD-src-d73862793bc31f12208c877a64fee924896b3d1b.zip FreeBSD-src-d73862793bc31f12208c877a64fee924896b3d1b.tar.gz |
Simplify a stale assertion. We have not called mi_switch() from a nested
critical section during a preemption for several years.
MFC after: 1 week
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_synch.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index d3aef76..05fb4a1 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -400,9 +400,7 @@ mi_switch(int flags, struct thread *newtd) if (!TD_ON_LOCK(td) && !TD_IS_RUNNING(td)) mtx_assert(&Giant, MA_NOTOWNED); #endif - KASSERT(td->td_critnest == 1 || (td->td_critnest == 2 && - (td->td_owepreempt) && (flags & SW_INVOL) != 0 && - newtd == NULL) || panicstr, + KASSERT(td->td_critnest == 1 || panicstr, ("mi_switch: switch in a critical section")); KASSERT((flags & (SW_INVOL | SW_VOL)) != 0, ("mi_switch: switch must be voluntary or involuntary")); |