Skip to main content

RealTimeClassRq

Struct RealTimeClassRq 

Source
pub struct RealTimeClassRq {
    queues: [RtPrioQueue; 100],
    bitmap: u128,
}

Fields§

§queues: [RtPrioQueue; 100]§bitmap: u128

Implementations§

Source§

impl RealTimeClassRq

Source

pub fn new() -> Self

Source

fn set_bit(&mut self, prio: u8)

Source

fn clear_bit(&mut self, prio: u8)

Source

fn is_budget_exhausted(task: &Task, now: u64) -> bool

Check if an RT task’s budget has expired and the period has not yet elapsed. Returns true if the task should be skipped (degraded).

Source

fn reset_budget(task: &Task, now: u64)

Reset the RT budget for a task. Called when the period has expired or when the task is first enqueued.

Source

fn front_is_degraded(q: &RtPrioQueue, now: u64) -> bool

Check if the front task of a priority queue is degraded.

Trait Implementations§

Source§

impl SchedClassRq for RealTimeClassRq

Source§

fn enqueue(&mut self, task: Arc<Task>)

Performs the enqueue operation.
Source§

fn len(&self) -> usize

Performs the len operation.
Source§

fn pick_next(&mut self) -> Option<Arc<Task>>

Performs the pick next operation.
Source§

fn update_current( &mut self, rt: &CurrentRuntime, task: &Task, is_yield: bool, ) -> bool

Updates current.
Source§

fn remove(&mut self, task_id: TaskId) -> bool

Performs the remove operation.
Source§

fn is_empty(&self) -> bool

Returns whether empty.
Source§

fn tick_update_wait(&mut self)

Called once per timer tick. Increments wait-time counters for all queued (non-running) tasks. Default no-op for classes that don’t track starvation.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.