RTEMS
|
This structure defines the configuration of a task constructed by rtems_task_construct(). More...
#include <tasks.h>
Public Attributes | |
rtems_name | name |
This member defines the name of the task. | |
rtems_task_priority | initial_priority |
This member defines the initial priority of the task. | |
void * | storage_area |
This member shall point to the task storage area begin. More... | |
size_t | storage_size |
This member defines size of the task storage area in bytes. More... | |
size_t | maximum_thread_local_storage_size |
This member defines the maximum thread-local storage size supported by the task storage area. More... | |
void(* | storage_free )(void *) |
This member defines the optional handler to free the task storage area. More... | |
rtems_mode | initial_modes |
This member defines the initial modes of the task. | |
rtems_attribute | attributes |
This member defines the attributes of the task. | |
This structure defines the configuration of a task constructed by rtems_task_construct().
size_t rtems_task_config::maximum_thread_local_storage_size |
This member defines the maximum thread-local storage size supported by the task storage area.
Use RTEMS_ALIGN_UP() and RTEMS_TASK_STORAGE_ALIGNMENT to adjust the size to meet the minimum alignment requirement of a thread-local storage area used to construct a task.
If the value is less than the actual thread-local storage size, then the task construction by rtems_task_construct() fails.
If the is less than the task storage area size, then the task construction by rtems_task_construct() fails.
The actual thread-local storage size is determined when the application executable is linked. The rtems-exeinfo
command line tool included in the RTEMS Tools can be used to obtain the thread-local storage size and alignment of an application executable.
The application may configure the maximum thread-local storage size for all threads explicitly through the CONFIGURE_MAXIMUM_THREAD_LOCAL_STORAGE_SIZE configuration option.
void* rtems_task_config::storage_area |
This member shall point to the task storage area begin.
The task storage area will contain the task stack, the thread-local storage, and the floating-point context on architectures with a separate floating-point context.
The task storage area begin address and size should be aligned by RTEMS_TASK_STORAGE_ALIGNMENT. To avoid memory waste, use RTEMS_ALIGNED() and RTEMS_TASK_STORAGE_ALIGNMENT to enforce the recommended alignment of a statically allocated task storage area.
void( * rtems_task_config::storage_free) (void *) |
This member defines the optional handler to free the task storage area.
It is called on exactly two mutually exclusive occasions. Firstly, when the task construction aborts due to a failed task create extension, or secondly, when the task is deleted. It is called from task context under protection of the object allocator lock. It is allowed to call free() in this handler. If handler is NULL, then no action will be performed.
size_t rtems_task_config::storage_size |
This member defines size of the task storage area in bytes.
Use the RTEMS_TASK_STORAGE_SIZE() macro to determine the recommended task storage area size.