Date: Fri, 10 Jun 2011 18:58:32 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r222940 - stable/8/sys/kern Message-ID: <201106101858.p5AIwW5a038915@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Jun 10 18:58:32 2011 New Revision: 222940 URL: http://svn.freebsd.org/changeset/base/222940 Log: MFC 222252: Simplify a stale assertion. We have not called mi_switch() from a nested critical section during a preemption for several years. Modified: stable/8/sys/kern/kern_synch.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/kern_synch.c ============================================================================== --- stable/8/sys/kern/kern_synch.c Fri Jun 10 18:56:12 2011 (r222939) +++ stable/8/sys/kern/kern_synch.c Fri Jun 10 18:58:32 2011 (r222940) @@ -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"));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106101858.p5AIwW5a038915>