Skip to main content

set_kernel_stack

Function set_kernel_stack 

Source
pub fn set_kernel_stack(stack_top: VirtAddr)
Expand description

Update TSS.rsp0 — the kernel stack pointer used when transitioning from Ring 3 to Ring 0 on interrupt/syscall.

Called on every context switch to point to the new task’s kernel stack top.