pub type Trapframe = Riscv64;
Aliased Type§
struct Trapframe {
pub regs: Registers,
pub epc: u64,
pub hartid: u64,
satp: u64,
kernel_stack: u64,
kernel_trap: u64,
}
Fields§
§regs: Registers
§epc: u64
§hartid: u64
§satp: u64
§kernel_stack: u64
§kernel_trap: u64
Implementations§
Source§impl Trapframe
impl Trapframe
pub fn set_trap_handler(&mut self, addr: usize)
pub fn set_next_address_space(&mut self, asid: u16)
pub fn get_syscall_number(&self) -> usize
pub fn set_syscall_number(&mut self, syscall_number: usize)
pub fn get_return_value(&self) -> usize
pub fn set_return_value(&mut self, value: usize)
pub fn get_arg(&self, index: usize) -> usize
pub fn set_arg(&mut self, index: usize, value: usize)
Sourcepub fn increment_pc_next(&mut self, task: &Task)
pub fn increment_pc_next(&mut self, task: &Task)
Increment the program counter (epc) to the next instruction This is typically used after handling a trap or syscall to continue execution.