Skip to main content

SchedContext

Struct SchedContext 

Source
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: u8

Phase 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: OptUs

Phase 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: OptUs

Phase 110.G — time-triggered window length. See tt_window_offset_us.

Implementations§

Trait Implementations§

Source§

impl Clone for SchedContext

Source§

fn clone(&self) -> SchedContext

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SchedContext

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for SchedContext

Source§

fn default() -> SchedContext

Returns the “default value” for a type. Read more
Source§

impl Copy for SchedContext

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.