distortos  v0.7.0
object-oriented C++ RTOS for microcontrollers
distortos::internal::anonymous_namespace{Stack.cpp} Namespace Reference

Functions

void * adjustStorage (void *const storage, const size_t alignment)
 Adjusts storage's address to suit architecture's alignment requirements. More...
 
size_t adjustSize (void *const storage, const size_t size, void *const adjustedStorage, const size_t alignment)
 Adjusts storage's size to suit architecture's alignment requirements. More...
 

Variables

constexpr size_t stackAlignment {DISTORTOS_ARCHITECTURE_STACK_ALIGNMENT}
 alignment of stack, bytes More...
 
constexpr uint32_t stackSentinel {0xed419f25}
 sentinel used for stack usage/overflow detection More...
 

Function Documentation

◆ adjustSize()

size_t distortos::internal::anonymous_namespace{Stack.cpp}::adjustSize ( void *const  storage,
const size_t  size,
void *const  adjustedStorage,
const size_t  alignment 
)

Adjusts storage's size to suit architecture's alignment requirements.

Parameters
[in]storageis a pointer to stack's storage
[in]sizeis the size of stack's storage, bytes
[in]adjustedStorageis an adjusted storage's address
[in]alignmentis the required stack alignment, bytes
Returns
adjusted storage's size

◆ adjustStorage()

void* distortos::internal::anonymous_namespace{Stack.cpp}::adjustStorage ( void *const  storage,
const size_t  alignment 
)

Adjusts storage's address to suit architecture's alignment requirements.

Parameters
[in]storageis a pointer to stack's storage
[in]alignmentis the required stack alignment, bytes
Returns
adjusted storage's address

Variable Documentation

◆ stackAlignment

constexpr size_t distortos::internal::anonymous_namespace{Stack.cpp}::stackAlignment {DISTORTOS_ARCHITECTURE_STACK_ALIGNMENT}

alignment of stack, bytes

◆ stackSentinel

constexpr uint32_t distortos::internal::anonymous_namespace{Stack.cpp}::stackSentinel {0xed419f25}

sentinel used for stack usage/overflow detection