Do not pass a thread with the state TDS_RUNQ to setrunqueue(), otherwise

assertion in setrunqueue() fails.
This commit is contained in:
Seigo Tanimura 2002-07-21 10:55:57 +00:00
parent 2babaf74b5
commit 1b64ed3b5b

View File

@ -504,8 +504,11 @@ faultin(p)
PROC_LOCK(p);
mtx_lock_spin(&sched_lock);
FOREACH_THREAD_IN_PROC (p, td)
if (td->td_state == TDS_RUNQ) /* XXXKSE */
if (td->td_state == TDS_RUNQ) { /* XXXKSE */
/* XXXKSE TDS_RUNQ causes assertion failure. */
td->td_state = TDS_UNQUEUED;
setrunqueue(td);
}
p->p_sflag |= PS_INMEM;