pub trait UserModeHooks {
// Provided methods
fn has_kernel_event(&self) -> bool { ... }
fn pre_user_run(&self, _guard: &DisabledLocalIrqGuard) { ... }
}Expand description
Hooks that will be called during UserMode::execute.
Provided Methods§
Sourcefn has_kernel_event(&self) -> bool
fn has_kernel_event(&self) -> bool
Checks whether a kernel event is pending.
This method will be called after user space is interrupted
by external interrupts. If the result is true,
UserMode::execute will return with ReturnReason::KernelEvent.
Sourcefn pre_user_run(&self, _guard: &DisabledLocalIrqGuard)
fn pre_user_run(&self, _guard: &DisabledLocalIrqGuard)
Prepares user space execution.
This method will be called just before entering user space. Local IRQs are disabled and will only be enabled after entering user space.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".