RTEMS
|
Stack Handler. More...
Files | |
file | stack.h |
Information About the Thread Stack Handler. | |
file | stackimpl.h |
Inlined Routines from the Stack Handler. | |
file | stackallocatorfreenothing.c |
_Stack_Free_nothing() Implementation | |
file | threadstackallocate.c |
Stack Allocate Helper. | |
Classes | |
struct | Stack_Control |
Macros | |
#define | STACK_MINIMUM_SIZE CPU_STACK_MINIMUM_SIZE |
Typedefs | |
typedef void(* | Stack_Allocator_initialize) (size_t stack_space_size) |
The stack allocator initialization handler. More... | |
typedef void *(* | Stack_Allocator_allocate) (size_t stack_size) |
Stack allocator allocate handler. More... | |
typedef void(* | Stack_Allocator_free) (void *addr) |
Stack allocator free handler. More... | |
Functions | |
void | _Stack_Allocator_do_initialize (void) |
Do the stack allocator initialization during system initialize. More... | |
static __inline__ void | _Stack_Initialize (Stack_Control *the_stack, void *starting_address, size_t size) |
Initializes stack with the given starting address and size. More... | |
static __inline__ uint32_t | _Stack_Minimum (void) |
Returns the minimum stack size. More... | |
static __inline__ bool | _Stack_Is_enough (size_t size, bool is_fp) |
Checks if the size is enough for a valid stack area on this processor. More... | |
static __inline__ size_t | _Stack_Ensure_minimum (size_t size) |
Returns the appropriate stack size for the requested size. More... | |
static __inline__ size_t | _Stack_Extend_size (size_t stack_size, bool is_fp) |
Extend the stack size to account for additional data structures allocated in the stack area of a thread. More... | |
void * | _Stack_Allocate (size_t stack_size) |
Allocate the requested stack space. More... | |
void | _Stack_Free (void *stack_area) |
Free the stack area allocated by _Stack_Allocate(). More... | |
void | _Stack_Free_nothing (void *stack_area) |
This function does nothing. More... | |
Variables | |
uint32_t | rtems_minimum_stack_size |
The minimum stack size. More... | |
const uintptr_t | _Stack_Space_size |
The configured stack space size. More... | |
const bool | _Stack_Allocator_avoids_workspace |
Indicates if the stack allocator avoids the workspace. More... | |
const Stack_Allocator_initialize | _Stack_Allocator_initialize |
The stack allocator initialization handler. More... | |
const Stack_Allocator_allocate | _Stack_Allocator_allocate |
The stack allocator allocate handler. More... | |
const Stack_Allocator_free | _Stack_Allocator_free |
The stack allocator free handler. More... | |
Stack Handler.
This handler encapsulates functionality which is used in the management of thread stacks.
#define STACK_MINIMUM_SIZE CPU_STACK_MINIMUM_SIZE |
typedef void*( * Stack_Allocator_allocate) (size_t stack_size) |
typedef void( * Stack_Allocator_free) (void *addr) |
typedef void( * Stack_Allocator_initialize) (size_t stack_space_size) |
void* _Stack_Allocate | ( | size_t | stack_size | ) |
Allocate the requested stack space.
stack_size | The stack space that is requested. |
stack_area | The allocated stack area. |
NULL | The allocation failed. |
Definition at line 25 of file threadstackallocate.c.
void _Stack_Allocator_do_initialize | ( | void | ) |
Do the stack allocator initialization during system initialize.
This function is used to initialize application provided stack allocators.
|
static |
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.
size | The stack size to check. |
Definition at line 114 of file stackimpl.h.
|
static |
Extend the stack size to account for additional data structures allocated in the stack area of a thread.
stack_size | The stack size. |
is_fp | Indicates if the stack is for a floating-point thread. |
Definition at line 132 of file stackimpl.h.
void _Stack_Free | ( | void * | stack_area | ) |
Free the stack area allocated by _Stack_Allocate().
Do nothing if the stack area is NULL.
stack_area | The stack area to free, or NULL. |
void _Stack_Free_nothing | ( | void * | stack_area | ) |
This function does nothing.
stack_area | is not used. |
Definition at line 42 of file stackallocatorfreenothing.c.
|
static |
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.
[out] | the_stack | The stack to initialize. |
starting_address | The starting_address for the new stack. | |
size | The size of the stack in bytes. |
Definition at line 49 of file stackimpl.h.
|
static |
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.
size | The stack size to check. |
is_fp | Indicates if the stack is for a floating-point thread. |
true | size is large enough. |
false | size is not large enough. |
Definition at line 84 of file stackimpl.h.
|
static |
Returns the minimum stack size.
This function returns the minimum stack size configured for this application.
Definition at line 67 of file stackimpl.h.
const Stack_Allocator_allocate _Stack_Allocator_allocate |
The stack allocator allocate handler.
Application provided via <rtems/confdefs.h>.
Definition at line 37 of file stackallocator.c.
const bool _Stack_Allocator_avoids_workspace |
Indicates if the stack allocator avoids the workspace.
Application provided via <rtems/confdefs.h>.
Definition at line 35 of file stackallocator.c.
const Stack_Allocator_free _Stack_Allocator_free |
The stack allocator free handler.
Application provided via <rtems/confdefs.h>.
const Stack_Allocator_initialize _Stack_Allocator_initialize |
The stack allocator initialization handler.
Application provided via <rtems/confdefs.h>.
const uintptr_t _Stack_Space_size |
The configured stack space size.
Application provided via <rtems/confdefs.h>.
uint32_t rtems_minimum_stack_size |
The minimum stack size.
Application provided via <rtems/confdefs.h>.