Enum kernel::scheduler::SchedulingDecision
source · pub enum SchedulingDecision {
RunProcess((ProcessId, Option<u32>)),
TrySleep,
}
Expand description
Enum representing the actions the scheduler can request in each call to
scheduler.next()
.
Variants§
RunProcess((ProcessId, Option<u32>))
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)