This entry in the thread control block (i.e., the uthread_t structure)
What is this?
It is a data structure to hold:
- The thread's signal mask
- Its execution stack
- Machine register values
Linux provides functions for initializing and swapping this context information:
- int getcontext(ucontext_t *ucp)
- int setcontext(const ucontext_t *ucp)
- int swapcontext(ucontext_t *olducp, ucontext_t *newucp)
- void makecontext(ucontext_t *ucp, void *f(), int argc, ...)