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
This commit is contained in:
John Baldwin 2011-05-24 13:17:08 +00:00
parent 61401ec2de
commit 211d4a2c42

View File

@ -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"));