Function rstubs::arch::context::switch_to_user

source ยท
pub extern "C" fn switch_to_user(
    ds: SegmentSelector,
    sp: *mut u32,
    cs: SegmentSelector,
    ip: *mut (),
    syscall_ret: u32,
) -> !
Expand description

Prepare for return from interrupt to user, the expected current stack layout is:

 _____________________________
| User Data Segment Selector  |
| User Stack Pointer          |
| EFLAGS (Interrupts enabled) |
| User Code Segment Selector  |
| Target Instruction Pointer  |