Enum kernel::process::FaultAction
source · pub enum FaultAction {
Panic,
Restart,
Stop,
}
Expand description
The action the kernel should take when a process encounters a fault.
When an exception occurs during a process’s execution (a common example is a process trying to access memory outside of its allowed regions) the system will trap back to the kernel, and the kernel has to decide what to do with the process at that point.
The actions are separate from the policy on deciding which action to take. A separate process-specific policy should determine which action to take.
Variants§
Panic
Generate a panic!()
call and crash the entire system. This is useful
for debugging applications as the error is displayed immediately after
it occurs.
Restart
Attempt to cleanup and restart the process which caused the fault. This resets the process’s memory to how it was when the process was started and schedules the process to run again from its init function.
Stop
Stop the process by no longer scheduling it to run.
Trait Implementations§
source§impl Clone for FaultAction
impl Clone for FaultAction
source§fn clone(&self) -> FaultAction
fn clone(&self) -> FaultAction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreimpl Copy for FaultAction
Auto Trait Implementations§
impl Freeze for FaultAction
impl RefUnwindSafe for FaultAction
impl Send for FaultAction
impl Sync for FaultAction
impl Unpin for FaultAction
impl UnwindSafe for FaultAction
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
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)
clone_to_uninit
)