Skip to main content

posix_nice_for

Function posix_nice_for 

Source
pub const fn posix_nice_for(normalized: u8) -> i32
Expand description

POSIX nice value (-20..=19, lower = more CPU) for a normalized 0–31 priority. Best-effort: native preemption normally uses the default scheduler (strict ordering needs SCHED_FIFO + privileges), so this is an advisory niceness, linear over the scale and clamped, with idle (0) pinned to the maximum 19. Anchors track the RFC-0016 table (12→0 normal, 31→-20 critical).