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

Function sched_nice

freebsd/kern/sched_ule.c:2168–2182  ·  view source on GitHub ↗

* Adjust thread priorities as a result of a nice request. */

Source from the content-addressed store, hash-verified

2166 * Adjust thread priorities as a result of a nice request.
2167 */
2168void
2169sched_nice(struct proc *p, int nice)
2170{
2171 struct thread *td;
2172
2173 PROC_LOCK_ASSERT(p, MA_OWNED);
2174
2175 p->p_nice = nice;
2176 FOREACH_THREAD_IN_PROC(p, td) {
2177 thread_lock(td);
2178 sched_priority(td);
2179 sched_prio(td, td->td_base_user_pri);
2180 thread_unlock(td);
2181 }
2182}
2183
2184/*
2185 * Record the sleep time for the interactivity scorer.

Callers 2

doniceFunction · 0.70
vm_pageout_oomFunction · 0.50

Calls 2

sched_priorityFunction · 0.70
sched_prioFunction · 0.70

Tested by

no test coverage detected