Stack Handler.
More...
Stack Handler.
This handler encapsulates functionality which is used in the management of thread stacks.
◆ STACK_MINIMUM_SIZE
The following constant defines the minimum stack size which every thread must exceed.
◆ Stack_Allocator_allocate
typedef void*( * Stack_Allocator_allocate) (size_t stack_size) |
Stack allocator allocate handler.
- Parameters
-
stack_size | The size of the stack area to allocate in bytes. |
- Return values
-
NULL | Not enough memory. |
other | Pointer to begin of stack area. |
◆ Stack_Allocator_free
typedef void( * Stack_Allocator_free) (void *addr) |
Stack allocator free handler.
- Parameters
-
] | addr A pointer to previously allocated stack area or NULL. |
◆ Stack_Allocator_initialize
typedef void( * Stack_Allocator_initialize) (size_t stack_space_size) |
The stack allocator initialization handler.
- Parameters
-
stack_space_size | The size of the stack space in bytes. |
◆ _Stack_Allocate()
void* _Stack_Allocate |
( |
size_t |
stack_size | ) |
|
Allocate the requested stack space.
- Parameters
-
stack_size | The stack space that is requested. |
- Return values
-
stack_area | The allocated stack area. |
NULL | The allocation failed. |
◆ _Stack_Ensure_minimum()
Returns the appropriate stack size for the requested size.
This function returns the appropriate stack size given the requested size. If the requested size is below the minimum, then the minimum configured stack size is returned.
- Parameters
-
size | The stack size to check. |
- Returns
- The appropriate stack size.
◆ _Stack_Extend_size()
Extend the stack size to account for additional data structures allocated in the stack area of a thread.
- Parameters
-
stack_size | The stack size. |
is_fp | Indicates if the stack is for a floating-point thread. |
- Returns
- The extended stack size.
◆ _Stack_Free()
void _Stack_Free |
( |
void * |
stack_area | ) |
|
Free the stack area allocated by _Stack_Allocate().
Do nothing if the stack area is NULL.
- Parameters
-
stack_area | The stack area to free, or NULL. |
◆ _Stack_Initialize()
Initializes stack with the given starting address and size.
This routine initializes the_stack record to indicate that size bytes of memory starting at starting_address have been reserved for a stack.
- Parameters
-
[out] | the_stack | The stack to initialize. |
| starting_address | The starting_address for the new stack. |
| size | The size of the stack in bytes. |
◆ _Stack_Is_enough()
Checks if the size is enough for a valid stack area on this processor.
This function returns true if size bytes is enough memory for a valid stack area on this processor, and false otherwise.
- Parameters
-
size | The stack size to check. |
is_fp | Indicates if the stack is for a floating-point thread. |
- Return values
-
true | size is large enough. |
false | size is not large enough. |
◆ _Stack_Minimum()
Returns the minimum stack size.
This function returns the minimum stack size configured for this application.
- Returns
- The minimum stack size.
◆ _Stack_Allocator_allocate
The stack allocator allocate handler.
Application provided via <rtems/confdefs.h>.
◆ _Stack_Allocator_avoids_workspace
const bool _Stack_Allocator_avoids_workspace |
Indicates if the stack allocator avoids the workspace.
Application provided via <rtems/confdefs.h>.
◆ _Stack_Allocator_free
◆ _Stack_Allocator_initialize
The stack allocator initialization handler.
Application provided via <rtems/confdefs.h>.
◆ _Stack_Space_size
const uintptr_t _Stack_Space_size |
◆ rtems_minimum_stack_size
uint32_t rtems_minimum_stack_size |