Struct kernel::scheduler::cooperative::CooperativeSched

source ·
pub struct CooperativeSched<'a> {
    pub processes: List<'a, CoopProcessNode<'a>>,
}
Expand description

Cooperative Scheduler

Fields§

§processes: List<'a, CoopProcessNode<'a>>

Implementations§

source§

impl<'a> CooperativeSched<'a>

source

pub const fn new() -> CooperativeSched<'a>

Trait Implementations§

source§

impl<'a, C: Chip> Scheduler<C> for CooperativeSched<'a>

source§

fn next(&self) -> SchedulingDecision

Decide which process to run next. Read more
source§

fn result(&self, result: StoppedExecutingReason, _: Option<u32>)

Inform the scheduler of why the last process stopped executing, and how long it executed for. Notably, execution_time_us will be None if the the scheduler requested this process be run cooperatively.
source§

unsafe fn execute_kernel_work(&self, chip: &C)

Tell the scheduler to execute kernel work such as interrupt bottom halves and dynamic deferred calls. Most schedulers will use this default implementation, but schedulers which at times wish to defer interrupt handling will reimplement it. Read more
source§

unsafe fn do_kernel_work_now(&self, chip: &C) -> bool

Ask the scheduler whether to take a break from executing userspace processes to handle kernel tasks. Most schedulers will use this default implementation, which always prioritizes kernel work, but schedulers that wish to defer interrupt handling may reimplement it.
source§

unsafe fn continue_process(&self, _id: ProcessId, chip: &C) -> bool

Ask the scheduler whether to continue trying to execute a process. Read more

Auto Trait Implementations§

§

impl<'a> !Freeze for CooperativeSched<'a>

§

impl<'a> !RefUnwindSafe for CooperativeSched<'a>

§

impl<'a> !Send for CooperativeSched<'a>

§

impl<'a> !Sync for CooperativeSched<'a>

§

impl<'a> Unpin for CooperativeSched<'a>

§

impl<'a> !UnwindSafe for CooperativeSched<'a>

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
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, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.