⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

DeadlineEntity

Struct DeadlineEntity 

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

Process ID

§runtime_ns: u64

Worst-case execution time per period (nanoseconds)

§deadline_ns: u64

Relative deadline from period start (nanoseconds)

§period_ns: u64

Activation period (nanoseconds)

§runtime_remaining: u64

Remaining runtime in current period (nanoseconds). Decremented by tick(); reset by replenish().

§deadline_abs: u64

Absolute deadline for current period (nanoseconds since boot). Used to determine scheduling priority (earliest wins).

§period_start: u64

Absolute start of current period (nanoseconds since boot). Used to detect period boundaries for replenishment.

§throttled: bool

Whether this entity is currently throttled (runtime exhausted).

Implementations§

Source§

impl DeadlineEntity

Source

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 ID
  • runtime_ns - Worst-case execution time per period
  • deadline_ns - Relative deadline (must be <= period)
  • period_ns - Activation period
  • now_ns - Current time in nanoseconds since boot

Trait Implementations§

Source§

impl Clone for DeadlineEntity

Source§

fn clone(&self) -> DeadlineEntity

Returns a duplicate of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for DeadlineEntity

Source§

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

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

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 T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

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

§

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
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

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

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

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

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.