#[repr(C)]pub struct TrapFrame {
pub x: [usize; 32],
pub sepc: usize,
pub sstatus: usize,
pub satp: usize,
}Fields§
§x: [usize; 32]§sepc: usize§sstatus: usize§satp: usizeImplementations§
Source§impl TrapFrame
impl TrapFrame
Sourcepub fn save_to(&self, ctx: &mut ProcessContext)
pub fn save_to(&self, ctx: &mut ProcessContext)
Save trap frame state into a ProcessContext. Called before a context switch to preserve the old task’s state.
Sourcepub fn load_from(&mut self, ctx: &ProcessContext)
pub fn load_from(&mut self, ctx: &ProcessContext)
Load trap frame state from a ProcessContext. Called after a context switch to resume the new task.
Auto Trait Implementations§
impl Forget for TrapFrame
impl Freeze for TrapFrame
impl RefUnwindSafe for TrapFrame
impl Send for TrapFrame
impl Sync for TrapFrame
impl Unpin for TrapFrame
impl UnsafeUnpin for TrapFrame
impl UnwindSafe for TrapFrame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more