pub enum SchedPolicy {
Fifo {
os_pri: u8,
},
RoundRobin {
os_pri: u8,
quantum_ms: u32,
},
Deadline {
runtime_ns: u64,
period_ns: u64,
deadline_ns: u64,
},
Sporadic {
budget_us: u32,
period_us: u32,
hi_pri: u8,
lo_pri: u8,
},
}Expand description
Per-thread OS scheduling policy.
Fifo / RoundRobin / Deadline / Sporadic map to platform-
native scheduling classes when available. Platform(...) is the
escape hatch for RTOS-specific knobs (e.g. ThreadX preempt-
threshold) that don’t map cleanly into the portable variants.
User-facing API (Executor::open_threaded) takes the abstract
Priority-like values and PlatformScheduler translates
them into platform-native numerics — direction-flipped priority
(Zephyr / ThreadX low-numeric = high-priority vs POSIX / FreeRTOS
high-numeric = high-priority) handled internally. Phase 110.D.
Variants§
Fifo
POSIX SCHED_FIFO. os_pri is the platform-native numeric
priority; out-of-range values surface SchedError::OutOfRange.
RoundRobin
POSIX SCHED_RR with quantum_ms time slice.
Deadline
Linux SCHED_DEADLINE (sched_setattr). All values nanoseconds.
Sporadic
NuttX SCHED_SPORADIC server. Phase 110.E.
Trait Implementations§
Source§impl Clone for SchedPolicy
impl Clone for SchedPolicy
Source§fn clone(&self) -> SchedPolicy
fn clone(&self) -> SchedPolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more