pub struct SchedContext {
pub class: SchedClass,
pub priority: Priority,
pub period_us: OptUs,
pub budget_us: OptUs,
pub deadline_us: OptUs,
pub deadline_policy: DeadlinePolicy,
pub os_pri: u8,
pub tt_window_offset_us: OptUs,
pub tt_window_duration_us: OptUs,
}Expand description
First-class scheduling capability — one SC per scheduling concern, shared by every callback that should run under the same budget / period / deadline / class.
Phase 110.B.a defines the shape; 110.B.b’s builder methods on Executor consume it.
Fields§
§class: SchedClass§priority: Priority§period_us: OptUs§budget_us: OptUs§deadline_us: OptUs§deadline_policy: DeadlinePolicy§os_pri: u8Phase 110.F — opt-in OS-level priority for per-callback
dispatch. 0 (default) means “no per-callback OS priority”
— the executor’s cooperative dispatch path runs every
callback bound to this SC. Non-zero values trigger the
per-priority worker-pool path (registered via
Executor::register_os_priority_dispatcher); each callback
then runs on a worker thread the OS scheduler has elevated
to that numeric priority.
Numeric meaning is platform-defined (POSIX 1..99 for SCHED_FIFO; FreeRTOS 0..configMAX_PRIORITIES-1; Zephyr direction-flipped). Chain-priority assignment + chain grouping happen at the orchestration layer and are out of executor scope.
tt_window_offset_us: OptUsPhase 110.G — time-triggered window offset within the
executor’s major frame. None (sentinel 0) = always
eligible (no TT gate); Some(off) + tt_window_duration_us
gates dispatch to the half-open interval
[off, off + duration) mod major_frame.
Independent of class — a Sporadic-class SC can also be TT-
gated; both gates apply (skip dispatch when EITHER fails).
Pairs with Executor::register_time_triggered_dispatcher
which sets the major-frame length.
tt_window_duration_us: OptUsPhase 110.G — time-triggered window length. See
tt_window_offset_us.
Implementations§
Source§impl SchedContext
impl SchedContext
pub const fn new_fifo() -> SchedContext
Trait Implementations§
Source§impl Clone for SchedContext
impl Clone for SchedContext
Source§fn clone(&self) -> SchedContext
fn clone(&self) -> SchedContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more