Assert that Giant is not held in mi_switch() unless the process state

is SMTX or SRUN.
This commit is contained in:
John Baldwin
2001-10-23 17:52:49 +00:00
parent 67a5f3cdc2
commit ac9a258074
+4
View File
@@ -701,6 +701,10 @@ mi_switch()
u_int sched_nest;
mtx_assert(&sched_lock, MA_OWNED | MA_NOTRECURSED);
#ifdef INVARIANTS
if (p->p_stat != SMTX && p->p_stat != SRUN)
mtx_assert(&Giant, MA_NOTOWNED);
#endif
/*
* Compute the amount of time during which the current