Where is the system thread context written when the scheduler switches contexts? I know that when switching context, it doesn't seem to be written to _KTRAP_FRAME, but then where? I don't see the _CONTEXT structure in _KTHREAD.
why do you care?
The answer is obvious, and if you don't know it, or can't find it from google, the question motive becomes an important one