#[repr(u8)]pub enum StopState {
Show 14 variants
Waking = 0,
Awake = 1,
ForceWaking = 2,
ForceAwake = 3,
GroupStopping = 4,
GroupStopped = 5,
SignalDeliveryStopping = 6,
SignalDeliveryStopped = 7,
PtraceEventStopping = 8,
PtraceEventStopped = 9,
SyscallEnterStopping = 10,
SyscallEnterStopped = 11,
SyscallExitStopping = 12,
SyscallExitStopped = 13,
}Expand description
This enum describes the state that a task or thread group can be in when being stopped. The names are taken from ptrace(2).
Variants§
Waking = 0
In this state, the process has been told to wake up, but has not yet been woken. Individual threads may still be stopped.
Awake = 1
In this state, at least one thread is awake.
ForceWaking = 2
Same as the above, but you are not allowed to make further transitions. Used to kill the task / group. These names are not in ptrace(2).
ForceAwake = 3
GroupStopping = 4
In this state, the process has been told to stop via a signal, but has not yet stopped.
GroupStopped = 5
In this state, at least one thread of the process has stopped
SignalDeliveryStopping = 6
In this state, the task has received a signal, and it is being traced, so it will stop at the next opportunity.
SignalDeliveryStopped = 7
Same as the last one, but has stopped.
PtraceEventStopping = 8
Stop for a ptrace event: a variety of events defined by ptrace and enabled with the use of various ptrace features, such as the PTRACE_O_TRACE_* options. The parameter indicates the type of event. Examples include PTRACE_EVENT_FORK (the event is a fork), PTRACE_EVENT_EXEC (the event is exec), and other similar events.
PtraceEventStopped = 9
Same as the last one, but has stopped
SyscallEnterStopping = 10
In this state, we have stopped before executing a syscall
SyscallEnterStopped = 11
SyscallExitStopping = 12
In this state, we have stopped after executing a syscall
SyscallExitStopped = 13
Implementations§
Source§impl StopState
impl StopState
Sourcepub fn is_stopping_or_stopped(&self) -> bool
pub fn is_stopping_or_stopped(&self) -> bool
This means a stop is either in progress or we’ve stopped.
Sourcepub fn is_stopping(&self) -> bool
pub fn is_stopping(&self) -> bool
This means a stop is in progress. Refers to any stop state ending in “ing”.
Sourcepub fn is_stopped(&self) -> bool
pub fn is_stopped(&self) -> bool
This means task is stopped.
Sourcepub fn finalize(&self) -> Result<StopState, ()>
pub fn finalize(&self) -> Result<StopState, ()>
Returns the “ed” version of this StopState, if it is “ing”.
pub fn is_downgrade(&self, new_state: &StopState) -> bool
pub fn is_waking_or_awake(&self) -> bool
Sourcepub fn is_in_progress(&self) -> bool
pub fn is_in_progress(&self) -> bool
Indicate if the transition to the stopped / awake state is not finished. This function is typically used to determine when it is time to notify waiters.
pub fn ptrace_only(&self) -> bool
pub fn is_illegal_transition(&self, new_state: StopState) -> bool
pub fn is_force(&self) -> bool
pub fn as_in_progress(&self) -> Result<StopState, ()>
Trait Implementations§
impl Copy for StopState
impl StructuralPartialEq for StopState
Auto Trait Implementations§
impl Freeze for StopState
impl RefUnwindSafe for StopState
impl Send for StopState
impl Sync for StopState
impl Unpin for StopState
impl UnwindSafe for StopState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more