36 #ifndef _RTEMS_CONFDEFS_WKSPACE_H 37 #define _RTEMS_CONFDEFS_WKSPACE_H 39 #ifndef __CONFIGURATION_TEMPLATE_h 40 #error "Do not include this file directly, use <rtems/confdefs.h> instead" 55 #include <rtems/sysinit.h> 57 #ifdef CONFIGURE_TASK_STACK_FROM_ALLOCATOR 58 #define _Configure_From_stackspace( _stack_size ) \ 59 CONFIGURE_TASK_STACK_FROM_ALLOCATOR( _stack_size + CONTEXT_FP_SIZE ) 61 #define _Configure_From_stackspace( _stack_size ) \ 62 _Configure_From_workspace( _stack_size + CONTEXT_FP_SIZE ) 65 #ifndef CONFIGURE_EXTRA_TASK_STACKS 66 #define CONFIGURE_EXTRA_TASK_STACKS 0 69 #ifndef CONFIGURE_EXECUTIVE_RAM_SIZE 71 #define CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( _messages, _size ) \ 72 _Configure_From_workspace( \ 73 ( _messages ) * ( _Configure_Align_up( _size, sizeof( uintptr_t ) ) \ 74 + sizeof( CORE_message_queue_Buffer ) ) ) 76 #ifndef CONFIGURE_MESSAGE_BUFFER_MEMORY 77 #define CONFIGURE_MESSAGE_BUFFER_MEMORY 0 80 #ifndef CONFIGURE_MEMORY_OVERHEAD 81 #define CONFIGURE_MEMORY_OVERHEAD 0 89 #define _CONFIGURE_HEAP_HANDLER_OVERHEAD \ 90 _Configure_Align_up( HEAP_BLOCK_HEADER_SIZE, CPU_HEAP_ALIGNMENT ) 92 #define CONFIGURE_EXECUTIVE_RAM_SIZE \ 93 ( _CONFIGURE_MEMORY_FOR_POSIX_OBJECTS \ 94 + CONFIGURE_MESSAGE_BUFFER_MEMORY \ 95 + 1024 * CONFIGURE_MEMORY_OVERHEAD \ 96 + _CONFIGURE_HEAP_HANDLER_OVERHEAD ) 98 #define _CONFIGURE_STACK_SPACE_SIZE \ 99 ( _CONFIGURE_INIT_TASK_STACK_EXTRA \ 100 + _CONFIGURE_POSIX_INIT_THREAD_STACK_EXTRA \ 101 + _CONFIGURE_LIBBLOCK_TASKS_STACK_EXTRA \ 102 + CONFIGURE_EXTRA_TASK_STACKS \ 103 + rtems_resource_maximum_per_allocation( \ 104 _CONFIGURE_TASKS - CONFIGURE_MINIMUM_TASKS_WITH_USER_PROVIDED_STORAGE \ 106 * _Configure_From_stackspace( CONFIGURE_MINIMUM_TASK_STACK_SIZE ) \ 107 + rtems_resource_maximum_per_allocation( CONFIGURE_MAXIMUM_POSIX_THREADS ) \ 108 * _Configure_From_stackspace( CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE ) \ 109 + _CONFIGURE_HEAP_HANDLER_OVERHEAD ) 113 #if CONFIGURE_EXTRA_TASK_STACKS != 0 114 #error "CONFIGURE_EXECUTIVE_RAM_SIZE defined with request for CONFIGURE_EXTRA_TASK_STACKS" 117 #define _CONFIGURE_STACK_SPACE_SIZE 0 127 #ifdef CONFIGURE_UNIFIED_WORK_AREAS 138 #if defined(CONFIGURE_TASK_STACK_ALLOCATOR) \ 139 && defined(CONFIGURE_TASK_STACK_DEALLOCATOR) 140 #ifdef CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE 146 #ifdef CONFIGURE_TASK_STACK_ALLOCATOR_INIT 161 RTEMS_SYSINIT_DIRTY_MEMORY,
162 RTEMS_SYSINIT_ORDER_MIDDLE
164 #elif defined(CONFIGURE_TASK_STACK_ALLOCATOR) \ 165 || defined(CONFIGURE_TASK_STACK_DEALLOCATOR) 166 #error "CONFIGURE_TASK_STACK_ALLOCATOR and CONFIGURE_TASK_STACK_DEALLOCATOR must be both defined or both undefined" 169 #ifdef CONFIGURE_DIRTY_MEMORY 172 RTEMS_SYSINIT_DIRTY_MEMORY,
173 RTEMS_SYSINIT_ORDER_MIDDLE
177 #ifdef CONFIGURE_ZERO_WORKSPACE_AUTOMATICALLY 182 RTEMS_SYSINIT_ZERO_MEMORY,
183 RTEMS_SYSINIT_ORDER_MIDDLE
const bool _Stack_Allocator_avoids_workspace
Indicates if the stack allocator avoids the workspace.
Configuration Options Workspace Support Macros.
const bool _Memory_Zero_before_use
Indicates if the memory is zeroed during system initialization.
const Stack_Allocator_initialize _Stack_Allocator_initialize
The stack allocator initialization handler.
struct Heap_Control * _Workspace_Malloc_initialize_unified(void)
Initializes the C Program Heap so that it is unified with the RTEMS Workspace.
struct Heap_Control *(*const _Workspace_Malloc_initializer)(void)
This constant provides the C Program Heap initialization handler.
Information About Each Thread's Context.
const uintptr_t _Stack_Space_size
The configured stack space size.
Evaluate Thread Configuration Options.
#define CONFIGURE_TASK_STACK_ALLOCATOR
This configuration option is an initializer define.
#define CONFIGURE_EXECUTIVE_RAM_SIZE
This configuration option is an integer define.
void _Memory_Zero_free_areas(void)
Zeros all free memory areas of the system.
void _Stack_Allocator_do_initialize(void)
Do the stack allocator initialization during system initialize.
const bool _Workspace_Is_unified
Indicates if the workspace and C program heap are unified.
uint32_t rtems_minimum_stack_size
The minimum stack size.
Control block used to manage a heap.
Evaluate POSIX Initialization Thread Configuration Options.
#define CONFIGURE_TASK_STACK_DEALLOCATOR
This configuration option is an initializer define.
const Stack_Allocator_free _Stack_Allocator_free
The stack allocator free handler.
void(* Stack_Allocator_initialize)(size_t stack_space_size)
The stack allocator initialization handler.
Evaluate POSIX API Objects Configuration Options.
void(* Stack_Allocator_free)(void *addr)
Stack allocator free handler.
Constants and Structures Associated with the Message Queue Handler.
const uintptr_t _Workspace_Size
The workspace size in bytes.
const Stack_Allocator_allocate _Stack_Allocator_allocate
The stack allocator allocate handler.
Evaluate User Initialization Task Configuration Options.
#define CONFIGURE_TASK_STACK_ALLOCATOR_INIT
This configuration option is an initializer define.
Information About the Thread Stack Handler.
void *(* Stack_Allocator_allocate)(size_t stack_size)
Stack allocator allocate handler.
void _Memory_Dirty_free_areas(void)
Dirty all free memory areas of the system.
#define CONFIGURE_MINIMUM_TASK_STACK_SIZE
This configuration option is an integer define.
Evaluate Block Device Cache Configuration Options.