Skip to main content

apply_current_deadline

Function apply_current_deadline 

Source
pub unsafe fn apply_current_deadline(
    name: *const c_char,
    tier_class: *const c_char,
    budget_us: u64,
    period_us: u64,
    deadline_us: u64,
) -> bool
Expand description

Ask the kernel to reserve budget_us every period_us for the calling thread. Returns true when the kernel took it, and false otherwise. That covers a tier class that asks for no reservation, a refusal (no CAP_SYS_NICE), and a build whose port has no such kernel facility. On false the caller enforces the budget itself.

ยงSafety

name and tier_class are NUL-terminated strings or null.