Expand description
Phase 110.B — SchedContext API + supporting types.
A SchedContext is a first-class scheduling capability. Multiple
callbacks share one SC; one OS priority slot per Executor regardless
of callback count. Inspired by seL4 MCS (Mixed-Criticality
Scheduling).
110.B.a (this commit) lands the type surface + EdfReadySet. The
Executor builder methods (create_sched_context,
register_subscription_in, …) and the cbindgen / C / C++ wrappers
land in 110.B.b once the const-generic Executor<MAX_HANDLES, MAX_SC> reshape is sorted.
Structs§
- Atomic
Sporadic State - Phase 110.E.b — atomic sporadic-server state for ISR-driven
refill. ISR / timer-thread context calls
refill_thunkto top up the budget; spin_once reads atomically without any&mutaccess. - OptUs
- Optional time field with a sentinel
0for “absent”. - Sched
Context - First-class scheduling capability — one SC per scheduling concern, shared by every callback that should run under the same budget / period / deadline / class.
- Sched
Context Id - Identifier for a
SchedContextregistered with an Executor. 110.B.b adds storage[Option<SchedContext>; MAX_SC]; this index addresses into that array. - Sporadic
State - Phase 110.E — user-space sporadic-server runtime state.
- Time
Triggered Schedule - Fixed-size, no_std-friendly cyclic schedule.
Nis the declared maximum window count;window_countis the active length (callers can build the array up toNand setwindow_countto the actual size used). - Time
Triggered Window - One slot in a time-triggered schedule.
Enums§
- Deadline
Policy - How an EDF deadline is interpreted relative to a callback firing.
- Priority
- Criticality bucket for
SchedContext. Phase 110.C uses this to pick whichBucketedFifoSet/BucketedEdfSetslot a callback dispatches through; later phases (110.D) map it to OS priority. - Sched
Class - Scheduling class — picks the runtime queue + selection policy for the contained callbacks.
- Time
Triggered Schedule Error - Validation errors for a
TimeTriggeredSchedule.
Functions§
- atomic_
sporadic_ refill_ thunk - C-callable refill thunk that
PlatformTimer::create_periodicinvokes from the platform’s timer context. Single atomic store — safe in any thread / ISR context.