Dokumentation
context.cc File Reference
Include dependency graph for context.cc:Functions | |
| void | context_go () |
| Helper function to prepare parameters for Thread::kickoff. | |
| static void | panic () |
| Panic function. | |
| void * | prepareContext (void *tos, void(*kickoff)(void *), void *param1) |
| Prepares a context for its first activation. | |
Function Documentation
| void context_go | ( | ) |
Helper function to prepare parameters for Thread::kickoff.
This function will copy the first parameter for the kickoff function from the non-scratch register r15 into the register rdi (which is the first parameter according to the SystemV ABI).
context_switch jumps to this function on the first execution of a new context. The value mentioned above was placed on the stack by prepareContext during initialization and loaded into the register r15 while restoring the context in context_switch.
|
static |
Panic function.
If the kickoff function (assigned in prepareContext) returns, this parameterless function will be called – and stop the execution.