pub fn restore_signal_frame(
process: &Process,
thread: &Thread,
frame_ptr: usize,
) -> Result<(), KernelError>Expand description
Restore the original thread context from a signal frame on the user stack.
Called by sys_sigreturn after the signal handler returns. Reads the
SignalFrame from the user stack and restores all saved registers and the
signal mask.
§Arguments
process: The process whose signal mask will be restored.thread: The thread whose context will be restored.frame_ptr: User-space pointer to theSignalFrame(passed by the trampoline via RDI).
§Returns
Ok(())on success (thread context is restored, execution will resume at the interrupted instruction).Err(...)if the frame cannot be read.