Add a new informative KASSERT to ensure that a process is in the SRUN state
before we return it to cpu_switch().
This commit is contained in:
parent
8b63a08ab0
commit
f9e6abac73
@ -190,6 +190,9 @@ runq_choose(struct runq *rq)
|
||||
rqh = &rq->rq_queues[pri];
|
||||
p = TAILQ_FIRST(rqh);
|
||||
KASSERT(p != NULL, ("runq_choose: no proc on busy queue"));
|
||||
KASSERT(p->p_stat == SRUN,
|
||||
("runq_chose: process %d(%s) in state %d", p->p_pid,
|
||||
p->p_comm, p->p_stat));
|
||||
CTR3(KTR_RUNQ, "runq_choose: pri=%d p=%p rqh=%p", pri, p, rqh);
|
||||
TAILQ_REMOVE(rqh, p, p_procq);
|
||||
if (TAILQ_EMPTY(rqh)) {
|
||||
|
Loading…
Reference in New Issue
Block a user