FreeBSD/sys/kern/sched_ule.c
/*
 * Restore a thread's priority when priority propagation is
 * over.  The prio argument is the minimum priority the thread
 * needs to have to satisfy other possible priority lending
 * requests.  If the thread's regular priority is less
 * important than prio, the thread will keep a priority boost
 * of prio.
 */
Restore a thread's priority when priority propagation is
over.  The prio argument is the minimum priority the thread
needs to have to satisfy other possible priority lending
requests.  If the thread's regular priority is less
important than prio, the thread will keep a priority boost
of prio.
Restore a thread ' s priority when priority propagation is over . The prio argument is the minimum priority the thread needs to have to satisfy other possible priority lending requests . If the thread ' s regular priority is less important than prio the thread will keep a priority boost of prio .
void
sched_unlend_prio(struct thread *td, u_char prio)
{
	u_char base_pri;
	if (td->td_base_pri >= PRI_MIN_TIMESHARE &&
	    td->td_base_pri <= PRI_MAX_TIMESHARE)
		base_pri = td->td_user_pri;
	else
		base_pri = td->td_base_pri;
	if (prio >= base_pri) {
		td->td_flags &= ~TDF_BORROWING;
		sched_thread_priority(td, base_pri);
	} else
		sched_lend_prio(td, prio);
}
void sched_unlend_prio ( struct thread * td , u_char prio ) { u_char base_pri ; if ( td -> td_base_pri >= PRI_MIN_TIMESHARE && td -> td_base_pri <= PRI_MAX_TIMESHARE ) base_pri = td -> td_user_pri ; else base_pri = td -> td_base_pri ; if ( prio >= base_pri ) { td -> td_flags &= ~ TDF_BORROWING ; sched_thread_priority ( td , base_pri ) ; } else sched_lend_prio ( td , prio ) ; }
Restore a thread's priority when priority propagation is
 over.
Restore a thread ' s priority when priority propagation is over .