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

Function runq_add_pri

freebsd/kern/kern_switch.c:387–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385}
386
387void
388runq_add_pri(struct runq *rq, struct thread *td, u_char pri, int flags)
389{
390 struct rqhead *rqh;
391
392 KASSERT(pri < RQ_NQS, ("runq_add_pri: %d out of range", pri));
393 td->td_rqindex = pri;
394 runq_setbit(rq, pri);
395 rqh = &rq->rq_queues[pri];
396 CTR4(KTR_RUNQ, "runq_add_pri: td=%p pri=%d idx=%d rqh=%p",
397 td, td->td_priority, pri, rqh);
398 if (flags & SRQ_PREEMPTED) {
399 TAILQ_INSERT_HEAD(rqh, td, td_runq);
400 } else {
401 TAILQ_INSERT_TAIL(rqh, td, td_runq);
402 }
403}
404/*
405 * Return true if there are runnable processes of any priority on the run
406 * queue, false otherwise. Has no side effects, does not modify the run

Callers 1

tdq_runq_addFunction · 0.85

Calls 1

runq_setbitFunction · 0.85

Tested by

no test coverage detected