* Record the sleep time for the interactivity scorer. */
| 2185 | * Record the sleep time for the interactivity scorer. |
| 2186 | */ |
| 2187 | void |
| 2188 | sched_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 |
no test coverage detected