#[repr(C)]pub struct TrapContext {
pub x: [usize; 32],
pub sstatus: Sstatus,
pub sepc: usize,
pub kernel_satp: usize,
pub kernel_sp: usize,
pub trap_handler: usize,
}Expand description
The trap cotext containing the user context and the supervisor level
Fields
x: [usize; 32]The registers to be preserved.
sstatus: SstatusPrivilege level of the trap context
sepc: usizeSupervisor exception program counter.
kernel_satp: usizeSupervisor Address Translation and Protection
kernel_sp: usizeThe current sp to be recovered on next entry into kernel space.
trap_handler: usizeThe pointer to trap_handler
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TrapContext
impl Send for TrapContext
impl Sync for TrapContext
impl Unpin for TrapContext
impl UnwindSafe for TrapContext
Blanket Implementations
Mutably borrows from an owned value. Read more