pub struct Task {
pub period: u64,
pub wcet: u64,
pub deadline: u64,
pub priority: Priority,
}Expand description
A periodic (or sporadic) task in the static schedule.
Fields§
§period: u64Period T (time units, e.g. µs): minimum gap between two releases.
wcet: u64Worst-case execution time C (same unit as period).
deadline: u64Relative deadline D (≤ T). 0 → implicit deadline (D = T).
priority: PriorityFixed execution priority (higher = more urgent). Derivable from the
periods via TaskSet::assign_rate_monotonic.
Implementations§
Source§impl Task
impl Task
Sourcepub fn new(period: u64, wcet: u64, priority: Priority) -> Self
pub fn new(period: u64, wcet: u64, priority: Priority) -> Self
Task with implicit deadline (D = T).
Sourcepub fn with_deadline(
period: u64,
wcet: u64,
deadline: u64,
priority: Priority,
) -> Self
pub fn with_deadline( period: u64, wcet: u64, deadline: u64, priority: Priority, ) -> Self
Task with explicit (constrained) deadline D ≤ T.
Sourcepub fn effective_deadline(&self) -> u64
pub fn effective_deadline(&self) -> u64
Effective relative deadline: deadline, or period if deadline == 0.
Trait Implementations§
impl Copy for Task
impl Eq for Task
impl StructuralPartialEq for Task
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl Send for Task
impl Sync for Task
impl Unpin for Task
impl UnsafeUnpin for Task
impl UnwindSafe for Task
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more