Function arch_switch_to_user_space

Source
#[export_name = "arch_switch_to_user_space"]
pub fn arch_switch_to_user_space(trapframe: &mut Trapframe) -> !
Expand description

Switch to user space using the trampoline mechanism

This function prepares the trapframe for user space execution and jumps to the user trap exit handler using a trampoline.

ยงArguments

  • trapframe - A mutable reference to the trapframe that contains the state to switch to user space.

This function is marked as noreturn because it will not return to the caller. It will jump to the user trap exit handler, which will then return to user space.