rusty_mos::kernel::syscall_impl

Function do_syscall

Source
#[no_mangle]
pub fn do_syscall(trapframe: *mut TrapFrame)
Expand description

Get the syscall number and all the five arguments. Invoke the syscall.

The fourth and fifth argument is loaded from the stack. And the return value will be stored into the $v0.

If the syscall number is invalid (out of the range(MAX_SYS_NO)), the return value will be set as negated-KError::NoSys;