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

Function tdq_setlowpri

freebsd/kern/sched_ule.c:599–612  ·  view source on GitHub ↗

* Set lowpri to its exact value by searching the run-queue and * evaluating curthread. curthread may be passed as an optimization. */

Source from the content-addressed store, hash-verified

597 * evaluating curthread. curthread may be passed as an optimization.
598 */
599static void
600tdq_setlowpri(struct tdq *tdq, struct thread *ctd)
601{
602 struct thread *td;
603
604 TDQ_LOCK_ASSERT(tdq, MA_OWNED);
605 if (ctd == NULL)
606 ctd = pcpu_find(TDQ_ID(tdq))->pc_curthread;
607 td = tdq_choose(tdq);
608 if (td == NULL || td->td_priority > ctd->td_priority)
609 tdq->tdq_lowpri = ctd->td_priority;
610 else
611 tdq->tdq_lowpri = td->td_priority;
612}
613
614#ifdef SMP
615/*

Callers 3

sched_thread_priorityFunction · 0.85
sched_userret_slowpathFunction · 0.85
sched_remFunction · 0.85

Calls 2

pcpu_findFunction · 0.85
tdq_chooseFunction · 0.85

Tested by

no test coverage detected