pub(crate) trait UserContextApiInternal {
// Required methods
fn execute<F>(&mut self, has_kernel_event: F) -> ReturnReason
where F: FnMut() -> bool;
fn as_trap_frame(&self) -> TrapFrame;
}
Expand description
Specific architectures need to implement this trait. This should only used in UserMode
Only visible in ostd
.
Required Methods§
Sourcefn execute<F>(&mut self, has_kernel_event: F) -> ReturnReason
fn execute<F>(&mut self, has_kernel_event: F) -> ReturnReason
Starts executing in the user mode.
Sourcefn as_trap_frame(&self) -> TrapFrame
fn as_trap_frame(&self) -> TrapFrame
Uses the information inside CpuContext to build a trapframe
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.