pub struct DeadlineEntity {
pub pid: ProcessId,
pub runtime_ns: u64,
pub deadline_ns: u64,
pub period_ns: u64,
pub runtime_remaining: u64,
pub deadline_abs: u64,
pub period_start: u64,
pub throttled: bool,
}Expand description
A deadline scheduling entity describing a task’s timing parameters.
Fields§
§pid: ProcessIdProcess ID
runtime_ns: u64Worst-case execution time per period (nanoseconds)
deadline_ns: u64Relative deadline from period start (nanoseconds)
period_ns: u64Activation period (nanoseconds)
runtime_remaining: u64Remaining runtime in current period (nanoseconds). Decremented by tick(); reset by replenish().
deadline_abs: u64Absolute deadline for current period (nanoseconds since boot). Used to determine scheduling priority (earliest wins).
period_start: u64Absolute start of current period (nanoseconds since boot). Used to detect period boundaries for replenishment.
throttled: boolWhether this entity is currently throttled (runtime exhausted).
Implementations§
Source§impl DeadlineEntity
impl DeadlineEntity
Sourcepub fn new(
pid: ProcessId,
runtime_ns: u64,
deadline_ns: u64,
period_ns: u64,
now_ns: u64,
) -> Self
pub fn new( pid: ProcessId, runtime_ns: u64, deadline_ns: u64, period_ns: u64, now_ns: u64, ) -> Self
Create a new deadline entity.
§Arguments
pid- Process IDruntime_ns- Worst-case execution time per perioddeadline_ns- Relative deadline (must be <= period)period_ns- Activation periodnow_ns- Current time in nanoseconds since boot
Trait Implementations§
Source§impl Clone for DeadlineEntity
impl Clone for DeadlineEntity
Source§fn clone(&self) -> DeadlineEntity
fn clone(&self) -> DeadlineEntity
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeadlineEntity
impl Debug for DeadlineEntity
impl Copy for DeadlineEntity
Auto Trait Implementations§
impl Freeze for DeadlineEntity
impl RefUnwindSafe for DeadlineEntity
impl Send for DeadlineEntity
impl Sync for DeadlineEntity
impl Unpin for DeadlineEntity
impl UnwindSafe for DeadlineEntity
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)