Skip to main content

sched_task_level_by

Function sched_task_level_by 

Source
pub fn sched_task_level_by(
    n: usize,
    index: usize,
    smaller_is_urgent: bool,
    priority_of: impl Fn(usize) -> i64,
) -> Option<u8>
Expand description

Which level an executor is, and whether every level of the image is alive: what a supervisor that owns a route per level or feeds a watchdog reads, and what a board’s sched task runner states (the level count, and each sched task’s level by sched_task_level_by). Plain atomics in nros-node, so ungated. The level of sched task index of an image whose n sched tasks have the kernel priorities priority_of(0..n): its urgency order, 0 the most urgent, equal priorities in array order. For now a level is a sched task, so this is how a runner places each sched task’s executor (Executor::set_level). nros codegen entry writes NROS_ENTRY_LEVEL_OF_<node> by the same rule, over the same array. None when index is out of range.