FreeBSD/sys/kern/sched_ule.c
/*
 * Set lowpri to its exact value by searching the run-queue and
 * evaluating curthread.  curthread may be passed as an optimization.
 */
Set lowpri to its exact value by searching the run-queue and
evaluating curthread.  curthread may be passed as an optimization.
Set lowpri to its exact value by searching the run - queue and evaluating curthread . curthread may be passed as an optimization .
static void
tdq_setlowpri(struct tdq *tdq, struct thread *ctd)
{
	struct thread *td;
	TDQ_LOCK_ASSERT(tdq, MA_OWNED);
	if (ctd == NULL)
		ctd = pcpu_find(TDQ_ID(tdq))->pc_curthread;
	td = tdq_choose(tdq);
	if (td == NULL || td->td_priority > ctd->td_priority)
		tdq->tdq_lowpri = ctd->td_priority;
	else
		tdq->tdq_lowpri = td->td_priority;
}
static void tdq_setlowpri ( struct tdq * tdq , struct thread * ctd ) { struct thread * td ; TDQ_LOCK_ASSERT ( tdq , MA_OWNED ) ; if ( ctd == NULL ) ctd = pcpu_find ( TDQ_ID ( tdq ) ) -> pc_curthread ; td = tdq_choose ( tdq ) ; if ( td == NULL || td -> td_priority > ctd -> td_priority ) tdq -> tdq_lowpri = ctd -> td_priority ; else tdq -> tdq_lowpri = td -> td_priority ; }
Set lowpri to its exact value by searching the run-queue and
 evaluating curthread.
Set lowpri to its exact value by searching the run - queue and evaluating curthread .