diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-12-16 14:32:47 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-02-12 09:08:36 +0100 |
commit | 00c7ad4cab30aba80639ace29526c1efc2779074 (patch) | |
tree | 2ab8b6c899aa15c4b0b0d34e2de16314d6dcb8d0 /cpukit/include/rtems/score/stack.h | |
parent | score: Simplify TLS area allocation (diff) | |
download | rtems-00c7ad4cab30aba80639ace29526c1efc2779074.tar.bz2 |
score: Split stack allocator configuration
This allows the linker garbage collection to perform its work.
Update #3835.
Diffstat (limited to '')
-rw-r--r-- | cpukit/include/rtems/score/stack.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/cpukit/include/rtems/score/stack.h b/cpukit/include/rtems/score/stack.h index 2ad362abd2..df1df74867 100644 --- a/cpukit/include/rtems/score/stack.h +++ b/cpukit/include/rtems/score/stack.h @@ -58,6 +58,30 @@ typedef struct { } Stack_Control; /** + * @brief The stack allocator initialization handler. + * + * @param stack_space_size The size of the stack space in bytes. + */ +typedef void ( *Stack_Allocator_initialize )( size_t stack_space_size ); + +/** + * @brief Stack allocator allocate handler. + * + * @param stack_size The size of the stack area to allocate in bytes. + * + * @retval NULL Not enough memory. + * @retval other Pointer to begin of stack area. + */ +typedef void *( *Stack_Allocator_allocate )( size_t stack_size ); + +/** + * @brief Stack allocator free handler. + * + * @param] addr A pointer to previously allocated stack area or NULL. + */ +typedef void ( *Stack_Allocator_free )( void *addr ); + +/** * @brief The minimum stack size. * * Application provided via <rtems/confdefs.h>. @@ -71,6 +95,34 @@ extern uint32_t rtems_minimum_stack_size; */ extern const uintptr_t _Stack_Space_size; +/** + * @brief Indicates if the stack allocator avoids the workspace. + * + * Application provided via <rtems/confdefs.h>. + */ +extern const bool _Stack_Allocator_avoids_workspace; + +/** + * @brief The stack allocator initialization handler. + * + * Application provided via <rtems/confdefs.h>. + */ +extern const Stack_Allocator_initialize _Stack_Allocator_initialize; + +/** + * @brief The stack allocator allocate handler. + * + * Application provided via <rtems/confdefs.h>. + */ +extern const Stack_Allocator_allocate _Stack_Allocator_allocate; + +/** + * @brief The stack allocator free handler. + * + * Application provided via <rtems/confdefs.h>. + */ +extern const Stack_Allocator_free _Stack_Allocator_free; + /** @} */ #ifdef __cplusplus |