diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-09-26 09:31:29 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-10-14 07:29:41 +0200 |
commit | 2846b17d7e34f1bdcac579ea1e0fbcb251aff1cb (patch) | |
tree | 417358a08e61a123e196a378a29bed07ae9806f8 /cpukit/include/rtems | |
parent | score: Require power of two CPU_STACK_MINIMUM_SIZE (diff) | |
download | rtems-2846b17d7e34f1bdcac579ea1e0fbcb251aff1cb.tar.bz2 |
config: Changeable size for IDLE stack allocator
Allow the IDLE stack allocator to change the stack size. This can be
used by applications with a very dynamic thread-local storage size to
adjust the thread storage area of the IDLE tasks dynamically.
Update #4524.
Diffstat (limited to '')
-rw-r--r-- | cpukit/include/rtems/score/stack.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/cpukit/include/rtems/score/stack.h b/cpukit/include/rtems/score/stack.h index 360e4d61f6..7577ca0474 100644 --- a/cpukit/include/rtems/score/stack.h +++ b/cpukit/include/rtems/score/stack.h @@ -105,15 +105,22 @@ typedef void ( *Stack_Allocator_free )( void *addr ); * The allocate for idle handler is optional even when the user thread stack * allocator and deallocator are configured. * - * @param cpu Index of the CPU for the IDLE thread using this stack - * @param stack_size The size of the stack area to allocate in bytes. + * @param cpu is the index of the CPU for the IDLE thread using this stack. * - * @retval NULL Not enough memory. - * @retval other Pointer to begin of stack area. + * @param stack_size[in, out] is pointer to a size_t object. On function + * entry, the object contains the proposed size of the stack area to allocate + * in bytes. The proposed size does not take the actual thread-local storage + * size of the application into account. The stack allocator can modify the + * size to ensure that there is enough space available in the stack area for + * the thread-local storage. + * + * @retval NULL There was not enough memory available to allocate a stack area. + * + * @return Returns the pointer to begin of the allocated stack area. */ typedef void *( *Stack_Allocator_allocate_for_idle )( uint32_t cpu, - size_t stack_size + size_t *stack_size ); /** |