Skip to main content

busy_cycles_live

Function busy_cycles_live 

Source
pub fn busy_cycles_live(id: usize) -> u64
Expand description

busy_cycles plus the in-progress dispatch’s elapsed cycles, if id is the currently-running task (checked by the caller — this function just adds “cycles since the single global LAST_DISPATCH stamp”, which is only meaningful for whoever is actually running right now). Needed by [crate::deadlines::check_budget]: a task that never yields would otherwise never accumulate any completed-dispatch cycles at all, and its budget would never be checked.