FreeBSD/sys/kern/sched_ule.c
/*
 * Adjust thread priorities as a result of a nice request.
 */
Adjust thread priorities as a result of a nice request.
Adjust thread priorities as a result of a nice request .
void
sched_nice(struct proc *p, int nice)
{
	struct thread *td;
	PROC_LOCK_ASSERT(p, MA_OWNED);
	p->p_nice = nice;
	FOREACH_THREAD_IN_PROC(p, td) {
		thread_lock(td);
		sched_priority(td);
		sched_prio(td, td->td_base_user_pri);
		thread_unlock(td);
	}
}
void sched_nice ( struct proc * p , int nice ) { struct thread * td ; PROC_LOCK_ASSERT ( p , MA_OWNED ) ; p -> p_nice = nice ; FOREACH_THREAD_IN_PROC ( p , td ) { thread_lock ( td ) ; sched_priority ( td ) ; sched_prio ( td , td -> td_base_user_pri ) ; thread_unlock ( td ) ; } }
Adjust thread priorities as a result of a nice request.
Adjust thread priorities as a result of a nice request .