Phoenix
Object-oriented orthogonally persistent operating system
|
Typedefs | |
typedef void(* | StackEntryFunc )(void *arg) __NORETURN |
Pointer to function used to switch the stack to new location. | |
Functions | |
void | SwitchStack (vaddr_t stackAddr, StackEntryFunc entryFunc, void *arg) __NORETURN |
Switch stack to new location. |
typedef void(* anonymous_namespace{md_stack.h}::StackEntryFunc)(void *arg) __NORETURN |
Pointer to function used to switch the stack to new location.
Used with SwitchStack function.
arg | Optional argument to pass to the entry function. |
void anonymous_namespace{md_stack.h}::SwitchStack | ( | vaddr_t | stackAddr, |
StackEntryFunc | entryFunc, | ||
void * | arg = 0 |
||
) | [inline] |
Switch stack to new location.
Control is immediately transferred to the provided entry point. Returning from the new entry point is not possible so the application should ensure that all necessary information is passed to the new context.
stackAddr | Address of the new stack bottom. It is actually the address past the last byte of available stack space. The stack will grow down from this location. |
entryFunc | Function which should be called after the stack is switched. It is not possible to return from this function. |
arg | Argument to pass to entry function entryFunc. |