Enum kernel::syscall::ContextSwitchReason
source · [−]pub enum ContextSwitchReason {
SyscallFired {
syscall: Syscall,
},
Fault,
Interrupted,
}
Expand description
ContentSwitchReason
specifies why the process stopped executing and
execution returned to the kernel.
Variants
SyscallFired
Fields
syscall: Syscall
Process called a syscall. Also returns the syscall and relevant values.
Fault
Process triggered the hardfault handler.
The implementation should still save registers in the event that the
Platform
can handle the fault and allow the app to continue running.
For more details on this see Platform::process_fault_hook()
.
Interrupted
Process interrupted (e.g. by a hardware event)
Trait Implementations
sourceimpl Clone for ContextSwitchReason
impl Clone for ContextSwitchReason
sourcefn clone(&self) -> ContextSwitchReason
fn clone(&self) -> ContextSwitchReason
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl PartialEq<ContextSwitchReason> for ContextSwitchReason
impl PartialEq<ContextSwitchReason> for ContextSwitchReason
sourcefn eq(&self, other: &ContextSwitchReason) -> bool
fn eq(&self, other: &ContextSwitchReason) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ContextSwitchReason) -> bool
fn ne(&self, other: &ContextSwitchReason) -> bool
This method tests for !=
.
impl Copy for ContextSwitchReason
impl StructuralPartialEq for ContextSwitchReason
Auto Trait Implementations
impl RefUnwindSafe for ContextSwitchReason
impl !Send for ContextSwitchReason
impl !Sync for ContextSwitchReason
impl Unpin for ContextSwitchReason
impl UnwindSafe for ContextSwitchReason
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