#[repr(u8)]pub enum ExecutionState {
Running = 0,
Sleeping = 1,
Suspended = 2,
Exited = 255,
}
Expand description
Possible execution states for a thread. The transitions available are: +————+ +———–+ +———––+ | Sleeping +<—>+ Running +<—>+ Suspended | +————+ +—–+—–+ +———––+ | | +–––––+ +–>+ Exited | +–––––+ The kernel will not transition a thread out of the exited state.
Variants§
Running = 0
The thread is running or waiting to be scheduled on a CPU.
Sleeping = 1
The thread is sleeping, waiting for a condition in-kernel.
Suspended = 2
The thread is suspended, and will not resume until manually transitioned back to running.
Exited = 255
The thread has terminated, and will never run again.
Trait Implementations§
source§impl Clone for ExecutionState
impl Clone for ExecutionState
source§fn clone(&self) -> ExecutionState
fn clone(&self) -> ExecutionState
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 moresource§impl Debug for ExecutionState
impl Debug for ExecutionState
source§impl Hash for ExecutionState
impl Hash for ExecutionState
source§impl Ord for ExecutionState
impl Ord for ExecutionState
source§fn cmp(&self, other: &ExecutionState) -> Ordering
fn cmp(&self, other: &ExecutionState) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ExecutionState
impl PartialEq for ExecutionState
source§impl PartialOrd for ExecutionState
impl PartialOrd for ExecutionState
impl Copy for ExecutionState
impl Eq for ExecutionState
impl StructuralPartialEq for ExecutionState
Auto Trait Implementations§
impl Freeze for ExecutionState
impl ObjSafe for ExecutionState
impl RefUnwindSafe for ExecutionState
impl Send for ExecutionState
impl Sync for ExecutionState
impl Unpin for ExecutionState
impl UnwindSafe for ExecutionState
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§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
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.