From owner-p4-projects@FreeBSD.ORG Sun Sep 12 00:15:57 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2559F16A4CE; Sun, 12 Sep 2004 00:15:56 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C94FF16A4CE for ; Sun, 12 Sep 2004 00:15:56 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF11043D2F for ; Sun, 12 Sep 2004 00:15:56 +0000 (GMT) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i8C0Fuat011874 for ; Sun, 12 Sep 2004 00:15:56 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i8C0FuvS011871 for perforce@freebsd.org; Sun, 12 Sep 2004 00:15:56 GMT (envelope-from julian@freebsd.org) Date: Sun, 12 Sep 2004 00:15:56 GMT Message-Id: <200409120015.i8C0FuvS011871@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Subject: PERFORCE change 61366 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2004 00:15:57 -0000 http://perforce.freebsd.org/chv.cgi?CH=61366 Change 61366 by julian@julian_ref on 2004/09/12 00:15:50 tons of debugging stuff Affected files ... .. //depot/projects/nsched/sys/kern/kern_switch.c#19 edit .. //depot/projects/nsched/sys/kern/sched_4bsd.c#48 edit Differences ... ==== //depot/projects/nsched/sys/kern/kern_switch.c#19 (text+ko) ==== @@ -367,6 +367,8 @@ CTR3(KTR_RUNQ, "setrunqueue: td:%p kg:%p pid:%d", td, td->td_ksegrp, td->td_proc->p_pid); mtx_assert(&sched_lock, MA_OWNED); + KASSERT((td->td_inhibitors == 0), + ("setrunqueue: trying to run inhibitted thread")); KASSERT((TD_CAN_RUN(td) || TD_IS_RUNNING(td)), ("setrunqueue: bad thread state")); TD_SET_RUNQ(td); @@ -536,6 +538,9 @@ ctd = curthread; KASSERT ((ctd->td_kse != NULL && ctd->td_kse->ke_thread == ctd), ("thread has no (or wrong) sched-private part.")); + KASSERT((td->td_inhibitors == 0), + ("setrunqueue: trying to run inhibitted thread")); + CHECKRUNQ(td->td_ksegrp, td) pri = td->td_priority; cpri = ctd->td_priority; if (pri >= cpri || cold /* || dumping */ || TD_IS_INHIBITED(ctd) || ==== //depot/projects/nsched/sys/kern/sched_4bsd.c#48 (text+ko) ==== @@ -794,6 +794,8 @@ * added to the run queue and selected. */ if (newtd) { + KASSERT((newtd->td_inhibitors == 0), + ("trying to run inhibitted thread")); newtd->td_ksegrp->kg_avail_opennings--; newtd->td_kse->ke_flags |= KEF_DIDRUN; TD_SET_RUNNING(newtd);