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
TrapContextstruct 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, thesstatusregister, thesepcregister, the address of the kernel stack, and thesatpregister value that refers to the kernel page table.