MCPcopy Create free account
hub / github.com/F-Stack/f-stack / runq_remove_idx

Function runq_remove_idx

freebsd/kern/kern_switch.c:524–544  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

522}
523
524void
525runq_remove_idx(struct runq *rq, struct thread *td, u_char *idx)
526{
527 struct rqhead *rqh;
528 u_char pri;
529
530 KASSERT(td->td_flags & TDF_INMEM,
531 ("runq_remove_idx: thread swapped out"));
532 pri = td->td_rqindex;
533 KASSERT(pri < RQ_NQS, ("runq_remove_idx: Invalid index %d\n", pri));
534 rqh = &rq->rq_queues[pri];
535 CTR4(KTR_RUNQ, "runq_remove_idx: td=%p, pri=%d %d rqh=%p",
536 td, td->td_priority, pri, rqh);
537 TAILQ_REMOVE(rqh, td, td_runq);
538 if (TAILQ_EMPTY(rqh)) {
539 CTR0(KTR_RUNQ, "runq_remove_idx: empty");
540 runq_clrbit(rq, pri);
541 if (idx != NULL && *idx == pri)
542 *idx = (pri + 1) % RQ_NQS;
543 }
544}

Callers 2

runq_removeFunction · 0.85
tdq_runq_remFunction · 0.85

Calls 1

runq_clrbitFunction · 0.85

Tested by

no test coverage detected