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, thesstatus
register, thesepc
register, the address of the kernel stack, and thesatp
register value that refers to the kernel page table.