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

Function sched_sleep

freebsd/kern/sched_ule.c:2187–2202  ·  view source on GitHub ↗

* Record the sleep time for the interactivity scorer. */

Source from the content-addressed store, hash-verified

2185 * Record the sleep time for the interactivity scorer.
2186 */
2187void
2188sched_sleep(struct thread *td, int prio)
2189{
2190
2191 THREAD_LOCK_ASSERT(td, MA_OWNED);
2192
2193 td->td_slptick = ticks;
2194 if (TD_IS_SUSPENDED(td) || prio >= PSOCK)
2195 td->td_flags |= TDF_CANSWAP;
2196 if (PRI_BASE(td->td_pri_class) != PRI_TIMESHARE)
2197 return;
2198 if (static_boost == 1 && prio)
2199 sched_prio(td, prio);
2200 else if (static_boost && td->td_priority > static_boost)
2201 sched_prio(td, static_boost);
2202}
2203
2204/*
2205 * Schedule a thread to resume execution and record how long it voluntarily

Callers 3

sleepq_switchFunction · 0.70
thread_suspend_switchFunction · 0.70
thread_suspend_oneFunction · 0.70

Calls 1

sched_prioFunction · 0.70

Tested by

no test coverage detected