RTEMS
Macros
Task Stack Allocator Configuration

Macros

#define CONFIGURE_TASK_STACK_ALLOCATOR
 This configuration option is an initializer define. More...
 
#define CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE
 This configuration option is a boolean feature define. More...
 
#define CONFIGURE_TASK_STACK_ALLOCATOR_INIT
 This configuration option is an initializer define. More...
 
#define CONFIGURE_TASK_STACK_DEALLOCATOR
 This configuration option is an initializer define. More...
 
#define CONFIGURE_TASK_STACK_FROM_ALLOCATOR
 This configuration option is an initializer define. More...
 

Detailed Description

This section describes configuration options related to the task stack allocator. RTEMS allows the application or BSP to define its own allocation and deallocation methods for task stacks. This can be used to place task stacks in special areas of memory or to utilize a Memory Management Unit so that stack overflows are detected in hardware.

Macro Definition Documentation

◆ CONFIGURE_TASK_STACK_ALLOCATOR

#define CONFIGURE_TASK_STACK_ALLOCATOR

This configuration option is an initializer define.

The value of this configuration option initializes the stack allocator allocate handler.

Default Value
The default value is _Workspace_Allocate, which indicates that task stacks will be allocated from the RTEMS Workspace.
Value Constraints
The value of this configuration option shall be defined to a valid function pointer of the type void *( *allocate )( size_t ).
Notes

A correctly configured system shall configure the following to be consistent:

Definition at line 4490 of file appl-config.h.

◆ CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE

#define CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE

This configuration option is a boolean feature define.

In case this configuration option is defined, then the system is informed that the task stack allocator does not use the RTEMS Workspace.

Default Configuration
If this configuration option is undefined, then the described feature is not enabled.
Notes
This configuration option may be used if a custom task stack allocator is configured, see CONFIGURE_TASK_STACK_ALLOCATOR.

Definition at line 4508 of file appl-config.h.

◆ CONFIGURE_TASK_STACK_ALLOCATOR_INIT

#define CONFIGURE_TASK_STACK_ALLOCATOR_INIT

This configuration option is an initializer define.

The value of this configuration option initializes the stack allocator initialization handler.

Default Value
The default value is NULL.
Value Constraints
The value of this configuration option shall be defined to a valid function pointer of the type void ( *initialize )( size_t ) or to NULL.
Notes

A correctly configured system shall configure the following to be consistent:

Definition at line 4539 of file appl-config.h.

◆ CONFIGURE_TASK_STACK_DEALLOCATOR

#define CONFIGURE_TASK_STACK_DEALLOCATOR

This configuration option is an initializer define.

The value of this configuration option initializes the stack allocator deallocate handler.

Default Value
The default value is _Workspace_Free, which indicates that task stacks will be allocated from the RTEMS Workspace.
Value Constraints
The value of this configuration option shall be defined to a valid function pointer of the type void ( *deallocate )( void * ).
Notes

A correctly configured system shall configure the following to be consistent:

Definition at line 4569 of file appl-config.h.

◆ CONFIGURE_TASK_STACK_FROM_ALLOCATOR

#define CONFIGURE_TASK_STACK_FROM_ALLOCATOR

This configuration option is an initializer define.

The value of this configuration option is used to calculate the task stack space size.

Default Value
The default value is a macro which supports the system heap allocator.
Value Constraints
The value of this configuration option shall be defined to a macro which accepts exactly one parameter and returns an unsigned integer. The parameter will be an allocation size and the macro shall return this size plus the overhead of the allocator to manage an allocation request for this size.
Notes
This configuration option may be used if a custom task stack allocator is configured, see CONFIGURE_TASK_STACK_ALLOCATOR.

Definition at line 4593 of file appl-config.h.