Trait UserContextApiInternal

Source
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§

Source

fn execute<F>(&mut self, has_kernel_event: F) -> ReturnReason
where F: FnMut() -> bool,

Starts executing in the user mode.

Source

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.

Implementors§