Struct kernel::scheduler::round_robin::RoundRobinSched
source · pub struct RoundRobinSched<'a> {
pub processes: List<'a, RoundRobinProcessNode<'a>>,
/* private fields */
}
Expand description
Round Robin Scheduler
Fields§
§processes: List<'a, RoundRobinProcessNode<'a>>
Implementations§
source§impl<'a> RoundRobinSched<'a>
impl<'a> RoundRobinSched<'a>
pub const fn new() -> RoundRobinSched<'a>
pub const fn new_with_time(time_us: u32) -> RoundRobinSched<'a>
Trait Implementations§
source§impl<'a, C: Chip> Scheduler<C> for RoundRobinSched<'a>
impl<'a, C: Chip> Scheduler<C> for RoundRobinSched<'a>
source§fn next(&self) -> SchedulingDecision
fn next(&self) -> SchedulingDecision
Decide which process to run next. Read more
source§fn result(&self, result: StoppedExecutingReason, execution_time_us: Option<u32>)
fn result(&self, result: StoppedExecutingReason, execution_time_us: 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)
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
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.
Auto Trait Implementations§
impl<'a> !Freeze for RoundRobinSched<'a>
impl<'a> !RefUnwindSafe for RoundRobinSched<'a>
impl<'a> !Send for RoundRobinSched<'a>
impl<'a> !Sync for RoundRobinSched<'a>
impl<'a> Unpin for RoundRobinSched<'a>
impl<'a> !UnwindSafe for RoundRobinSched<'a>
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