Trait axhal::trap::TrapHandler

source ·
pub trait TrapHandler {
    // Required methods
    fn handle_irq(irq_num: usize, from_user: bool);
    fn handle_syscall(syscall_id: usize, args: [usize; 6]) -> isize;
    fn handle_page_fault(addr: VirtAddr, flags: MappingFlags);
    fn handle_signal();
}
Expand description

Trap handler interface.

This trait is defined with the #[def_interface] attribute. Users should implement it with #[impl_interface] in any other crate.

Required Methods§

source

fn handle_irq(irq_num: usize, from_user: bool)

Handles interrupt requests for the given IRQ number.

source

fn handle_syscall(syscall_id: usize, args: [usize; 6]) -> isize

Available on crate feature monolithic only.

Handles system calls for the given syscall ID and arguments.

source

fn handle_page_fault(addr: VirtAddr, flags: MappingFlags)

Available on crate feature monolithic only.

Handles page faults.

source

fn handle_signal()

Available on crate feature signal only.

Handles signals.

Object Safety§

This trait is not object safe.

Implementors§