Phoenix
Object-oriented orthogonally persistent operating system
Typedefs | Functions
anonymous_namespace{md_stack.h} Namespace Reference

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 Documentation

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.

Parameters:
argOptional argument to pass to the entry function.

Function Documentation

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.

Parameters:
stackAddrAddress 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.
entryFuncFunction which should be called after the stack is switched. It is not possible to return from this function.
argArgument to pass to entry function entryFunc.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines