Module kernel::executor::context

source ·
Expand description

The context module provides a TrapContext struct that save and restore the context of a thread when an exception or interrupt occurs.

Structs

  • The TrapContext struct is used to save and restore the context of a thread when an exception or interrupt occurs. It contains the values of all the general-purpose registers of the thread, the sstatus register, the sepc register, the address of the kernel stack, and the satp register value that refers to the kernel page table.