svn commit: r222252 - head/sys/kern
John Baldwin
jhb at FreeBSD.org
Tue May 24 13:17:09 UTC 2011
Author: jhb
Date: Tue May 24 13:17:08 2011
New Revision: 222252
URL: http://svn.freebsd.org/changeset/base/222252
Log:
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
Modified:
head/sys/kern/kern_synch.c
Modified: head/sys/kern/kern_synch.c
==============================================================================
--- head/sys/kern/kern_synch.c Tue May 24 13:08:59 2011 (r222251)
+++ head/sys/kern/kern_synch.c Tue May 24 13:17:08 2011 (r222252)
@@ -400,9 +400,7 @@ mi_switch(int flags, struct thread *newt
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"));
More information about the svn-src-head
mailing list