distortos
v0.7.0
object-oriented C++ RTOS for microcontrollers
|
Functions | |
void | removeStackFrame (const void *const savedStackPointer) |
Removes stack frame inserted by requestFunctionExecution() in case of interrupt -> current thread request. More... | |
void | functionTrampoline (void(&function)(), const void *const savedStackPointer, const bool fullContext) |
Trampoline used to execute function on new stack frame. More... | |
int | fromInterruptToCurrentThread (internal::ThreadControlBlock &threadControlBlock, void(&function)()) |
Handles request coming from interrupt context to execute provided function in current thread. More... | |
int | toNonCurrentThread (internal::ThreadControlBlock &threadControlBlock, void(&function)()) |
Handles request to execute provided function in non-current thread. More... | |
int distortos::architecture::anonymous_namespace{ARMv6-M-ARMv7-M-requestFunctionExecution.cpp}::fromInterruptToCurrentThread | ( | internal::ThreadControlBlock & | threadControlBlock, |
void(&)() | function | ||
) |
Handles request coming from interrupt context to execute provided function in current thread.
[in] | threadControlBlock | is a reference to ThreadControlBlock of current thread |
[in] | function | is a reference to function that should be executed in current thread |
void distortos::architecture::anonymous_namespace{ARMv6-M-ARMv7-M-requestFunctionExecution.cpp}::functionTrampoline | ( | void(&)() | function, |
const void *const | savedStackPointer, | ||
const bool | fullContext | ||
) |
Trampoline used to execute function on new stack frame.
After the function returns stack frame is removed and old stack pointer value is restored.
[in] | function | is a reference to function that will be executed |
[in] | savedStackPointer | is the stack pointer value before new stack frame was created |
[in] | fullContext | is an information about type of previous stack frame - "full", when the thread was not running (true) or "interrupt", when the thread was running and was interrupted (false) |
void distortos::architecture::anonymous_namespace{ARMv6-M-ARMv7-M-requestFunctionExecution.cpp}::removeStackFrame | ( | const void *const | savedStackPointer | ) |
Removes stack frame inserted by requestFunctionExecution() in case of interrupt -> current thread request.
[in] | savedStackPointer | is the stack pointer value before new stack frame was created |
[in] | fpuContextActive | (only when FPU is enabled) tells whether thread has active FPU context (true) or not (false) |
int distortos::architecture::anonymous_namespace{ARMv6-M-ARMv7-M-requestFunctionExecution.cpp}::toNonCurrentThread | ( | internal::ThreadControlBlock & | threadControlBlock, |
void(&)() | function | ||
) |
Handles request to execute provided function in non-current thread.
[in] | threadControlBlock | is a reference to internal::ThreadControlBlock of thread in which function should be executed |
[in] | function | is a reference to function that should be executed in thread associated with threadControlBlock |