pub enum SchedulingDecision {
RunProcess((ProcessId, Option<NonZeroU32>)),
TrySleep,
}
Expand description
Enum representing the actions the scheduler can request in each call to
scheduler.next()
.
Variants§
RunProcess((ProcessId, Option<NonZeroU32>))
Tell the kernel to run the specified process with the passed timeslice.
If None
is passed as a timeslice, the process will be run
cooperatively.
TrySleep
Tell the kernel to go to sleep. Notably, if the scheduler asks the
kernel to sleep when kernel tasks are ready, the kernel will not sleep,
and will instead restart the main loop and call next()
again.
Trait Implementations§
Source§impl Clone for SchedulingDecision
impl Clone for SchedulingDecision
Source§fn clone(&self) -> SchedulingDecision
fn clone(&self) -> SchedulingDecision
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl Copy for SchedulingDecision
Auto Trait Implementations§
impl Freeze for SchedulingDecision
impl !RefUnwindSafe for SchedulingDecision
impl !Send for SchedulingDecision
impl !Sync for SchedulingDecision
impl Unpin for SchedulingDecision
impl !UnwindSafe for SchedulingDecision
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