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 more