pub enum State {
Running,
Yielded,
StoppedRunning,
StoppedYielded,
Faulted,
Terminated,
Unstarted,
}
Expand description
Various states a process can be in.
This is made public in case external implementations of Process
want
to re-use these process states in the external implementation.
Variants
Running
Process expects to be running code. The process may not be currently scheduled by the scheduler, but the process has work to do if it is scheduled.
Yielded
Process stopped executing and returned to the kernel because it called
the yield
syscall. This likely means it is waiting for some event to
occur, but it could also mean it has finished and doesn’t need to be
scheduled again.
StoppedRunning
The process is stopped, and its previous state was Running. This is used
if the kernel forcibly stops a process when it is in the Running
state. This state indicates to the kernel not to schedule the process,
but if the process is to be resumed later it should be put back in the
running state so it will execute correctly.
StoppedYielded
The process is stopped, and it was stopped while it was yielded. If this
process needs to be resumed it should be put back in the Yield
state.
Faulted
The process faulted and cannot be run.
Terminated
The process exited with the exit-terminate
system call and cannot be
run.
Unstarted
The process has never actually been executed. This of course happens when the board first boots and the kernel has not switched to any processes yet. It can also happen if an process is terminated and all of its state is reset as if it has not been executed yet.
Trait Implementations
sourceimpl Eq for State
impl Eq for State
fn assert_receiver_is_total_eq(&self)
impl Copy for State
impl StructuralEq for State
impl StructuralPartialEq for State
Auto Trait Implementations
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnwindSafe for State
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more