PERFORCE change 61366 for review
Julian Elischer
julian at FreeBSD.org
Sat Sep 11 17:15:57 PDT 2004
http://perforce.freebsd.org/chv.cgi?CH=61366
Change 61366 by julian at 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);
More information about the p4-projects
mailing list