1 | .. SPDX-License-Identifier: CC-BY-SA-4.0 |
---|
2 | |
---|
3 | .. Copyright (C) 2020, 2021 embedded brains GmbH (http://www.embedded-brains.de) |
---|
4 | .. Copyright (C) 1988, 2021 On-Line Applications Research Corporation (OAR) |
---|
5 | |
---|
6 | .. This file is part of the RTEMS quality process and was automatically |
---|
7 | .. generated. If you find something that needs to be fixed or |
---|
8 | .. worded better please post a report or patch to an RTEMS mailing list |
---|
9 | .. or raise a bug report: |
---|
10 | .. |
---|
11 | .. https://www.rtems.org/bugs.html |
---|
12 | .. |
---|
13 | .. For information on updating and regenerating please refer to the How-To |
---|
14 | .. section in the Software Requirements Engineering chapter of the |
---|
15 | .. RTEMS Software Engineering manual. The manual is provided as a part of |
---|
16 | .. a release. For development sources please refer to the online |
---|
17 | .. documentation at: |
---|
18 | .. |
---|
19 | .. https://docs.rtems.org |
---|
20 | |
---|
21 | .. Generated from spec:/acfg/if/group-stackalloc |
---|
22 | |
---|
23 | Task Stack Allocator Configuration |
---|
24 | ================================== |
---|
25 | |
---|
26 | This section describes configuration options related to the task stack |
---|
27 | allocator. RTEMS allows the application or BSP to define its own allocation |
---|
28 | and deallocation methods for task stacks. This can be used to place task stacks |
---|
29 | in special areas of memory or to utilize a Memory Management Unit so that stack |
---|
30 | overflows are detected in hardware. |
---|
31 | |
---|
32 | .. Generated from spec:/acfg/if/task-stack-allocator |
---|
33 | |
---|
34 | .. index:: CONFIGURE_TASK_STACK_ALLOCATOR |
---|
35 | .. index:: task stack allocator |
---|
36 | |
---|
37 | .. _CONFIGURE_TASK_STACK_ALLOCATOR: |
---|
38 | |
---|
39 | CONFIGURE_TASK_STACK_ALLOCATOR |
---|
40 | ------------------------------ |
---|
41 | |
---|
42 | CONSTANT: |
---|
43 | ``CONFIGURE_TASK_STACK_ALLOCATOR`` |
---|
44 | |
---|
45 | OPTION TYPE: |
---|
46 | This configuration option is an initializer define. |
---|
47 | |
---|
48 | DEFAULT VALUE: |
---|
49 | The default value is ``_Workspace_Allocate``, which indicates that task |
---|
50 | stacks will be allocated from the RTEMS Workspace. |
---|
51 | |
---|
52 | VALUE CONSTRAINTS: |
---|
53 | The value of this configuration option shall be defined to a valid function |
---|
54 | pointer of the type ``void *( *allocate )( size_t )``. |
---|
55 | |
---|
56 | DESCRIPTION: |
---|
57 | The value of this configuration option initializes the stack allocator |
---|
58 | allocate handler. |
---|
59 | |
---|
60 | NOTES: |
---|
61 | A correctly configured system shall configure the following to be consistent: |
---|
62 | |
---|
63 | * :ref:`CONFIGURE_TASK_STACK_ALLOCATOR_INIT` |
---|
64 | |
---|
65 | * ``CONFIGURE_TASK_STACK_ALLOCATOR`` |
---|
66 | |
---|
67 | * :ref:`CONFIGURE_TASK_STACK_DEALLOCATOR` |
---|
68 | |
---|
69 | .. Generated from spec:/acfg/if/task-stack-no-workspace |
---|
70 | |
---|
71 | .. index:: CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE |
---|
72 | |
---|
73 | .. _CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE: |
---|
74 | |
---|
75 | CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE |
---|
76 | ------------------------------------------------ |
---|
77 | |
---|
78 | CONSTANT: |
---|
79 | ``CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE`` |
---|
80 | |
---|
81 | OPTION TYPE: |
---|
82 | This configuration option is a boolean feature define. |
---|
83 | |
---|
84 | DEFAULT CONFIGURATION: |
---|
85 | If this configuration option is undefined, then the described feature is not |
---|
86 | enabled. |
---|
87 | |
---|
88 | DESCRIPTION: |
---|
89 | In case this configuration option is defined, then the system is informed |
---|
90 | that the task stack allocator does not use the RTEMS Workspace. |
---|
91 | |
---|
92 | NOTES: |
---|
93 | This configuration option may be used if a custom task stack allocator is |
---|
94 | configured, see :ref:`CONFIGURE_TASK_STACK_ALLOCATOR`. |
---|
95 | |
---|
96 | .. Generated from spec:/acfg/if/task-stack-allocator-for-idle |
---|
97 | |
---|
98 | .. index:: CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE |
---|
99 | .. index:: task stack allocator for IDLE tasks |
---|
100 | |
---|
101 | .. _CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE: |
---|
102 | |
---|
103 | CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE |
---|
104 | --------------------------------------- |
---|
105 | |
---|
106 | CONSTANT: |
---|
107 | ``CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE`` |
---|
108 | |
---|
109 | OPTION TYPE: |
---|
110 | This configuration option is an initializer define. |
---|
111 | |
---|
112 | DEFAULT VALUE: |
---|
113 | The default value is ``_Stack_Allocator_allocate_for_idle_default``, which |
---|
114 | indicates that IDLE task stacks will be allocated from an area statically |
---|
115 | allocated by ``<rtems/confdefs.h>``. |
---|
116 | |
---|
117 | VALUE CONSTRAINTS: |
---|
118 | The value of this configuration option shall be defined to a valid function |
---|
119 | pointer of the type ``void *( *allocate )( uint32_t, size_t )``. |
---|
120 | |
---|
121 | DESCRIPTION: |
---|
122 | The value of this configuration option is the address for the stack allocator |
---|
123 | allocate handler used to allocate the task stack of each |
---|
124 | :term:`IDLE task`. |
---|
125 | |
---|
126 | NOTES: |
---|
127 | This configuration option is independent of the other thread stack allocator |
---|
128 | configuration options. It is assumed that any memory allocated for the stack |
---|
129 | of an :term:`IDLE task` will not be from the RTEMS Workspace or the |
---|
130 | memory statically allocated by default. |
---|
131 | |
---|
132 | .. Generated from spec:/acfg/if/task-stack-allocator-init |
---|
133 | |
---|
134 | .. index:: CONFIGURE_TASK_STACK_ALLOCATOR_INIT |
---|
135 | |
---|
136 | .. _CONFIGURE_TASK_STACK_ALLOCATOR_INIT: |
---|
137 | |
---|
138 | CONFIGURE_TASK_STACK_ALLOCATOR_INIT |
---|
139 | ----------------------------------- |
---|
140 | |
---|
141 | CONSTANT: |
---|
142 | ``CONFIGURE_TASK_STACK_ALLOCATOR_INIT`` |
---|
143 | |
---|
144 | OPTION TYPE: |
---|
145 | This configuration option is an initializer define. |
---|
146 | |
---|
147 | DEFAULT VALUE: |
---|
148 | The default value is `NULL <https://en.cppreference.com/w/c/types/NULL>`_. |
---|
149 | |
---|
150 | VALUE CONSTRAINTS: |
---|
151 | The value of this configuration option shall be defined to a valid function |
---|
152 | pointer of the type ``void ( *initialize )( size_t )`` or to `NULL |
---|
153 | <https://en.cppreference.com/w/c/types/NULL>`_. |
---|
154 | |
---|
155 | DESCRIPTION: |
---|
156 | The value of this configuration option initializes the stack allocator |
---|
157 | initialization handler. |
---|
158 | |
---|
159 | NOTES: |
---|
160 | A correctly configured system shall configure the following to be consistent: |
---|
161 | |
---|
162 | * ``CONFIGURE_TASK_STACK_ALLOCATOR_INIT`` |
---|
163 | |
---|
164 | * :ref:`CONFIGURE_TASK_STACK_ALLOCATOR` |
---|
165 | |
---|
166 | * :ref:`CONFIGURE_TASK_STACK_DEALLOCATOR` |
---|
167 | |
---|
168 | .. Generated from spec:/acfg/if/task-stack-deallocator |
---|
169 | |
---|
170 | .. index:: CONFIGURE_TASK_STACK_DEALLOCATOR |
---|
171 | .. index:: task stack deallocator |
---|
172 | |
---|
173 | .. _CONFIGURE_TASK_STACK_DEALLOCATOR: |
---|
174 | |
---|
175 | CONFIGURE_TASK_STACK_DEALLOCATOR |
---|
176 | -------------------------------- |
---|
177 | |
---|
178 | CONSTANT: |
---|
179 | ``CONFIGURE_TASK_STACK_DEALLOCATOR`` |
---|
180 | |
---|
181 | OPTION TYPE: |
---|
182 | This configuration option is an initializer define. |
---|
183 | |
---|
184 | DEFAULT VALUE: |
---|
185 | The default value is ``_Workspace_Free``, which indicates that task stacks |
---|
186 | will be allocated from the RTEMS Workspace. |
---|
187 | |
---|
188 | VALUE CONSTRAINTS: |
---|
189 | The value of this configuration option shall be defined to a valid function |
---|
190 | pointer of the type ``void ( *deallocate )( void * )``. |
---|
191 | |
---|
192 | DESCRIPTION: |
---|
193 | The value of this configuration option initializes the stack allocator |
---|
194 | deallocate handler. |
---|
195 | |
---|
196 | NOTES: |
---|
197 | A correctly configured system shall configure the following to be consistent: |
---|
198 | |
---|
199 | * :ref:`CONFIGURE_TASK_STACK_ALLOCATOR_INIT` |
---|
200 | |
---|
201 | * :ref:`CONFIGURE_TASK_STACK_ALLOCATOR` |
---|
202 | |
---|
203 | * ``CONFIGURE_TASK_STACK_DEALLOCATOR`` |
---|
204 | |
---|
205 | .. Generated from spec:/acfg/if/task-stack-from-alloc |
---|
206 | |
---|
207 | .. index:: CONFIGURE_TASK_STACK_FROM_ALLOCATOR |
---|
208 | .. index:: task stack allocator |
---|
209 | |
---|
210 | .. _CONFIGURE_TASK_STACK_FROM_ALLOCATOR: |
---|
211 | |
---|
212 | CONFIGURE_TASK_STACK_FROM_ALLOCATOR |
---|
213 | ----------------------------------- |
---|
214 | |
---|
215 | CONSTANT: |
---|
216 | ``CONFIGURE_TASK_STACK_FROM_ALLOCATOR`` |
---|
217 | |
---|
218 | OPTION TYPE: |
---|
219 | This configuration option is an initializer define. |
---|
220 | |
---|
221 | DEFAULT VALUE: |
---|
222 | The default value is a macro which supports the system heap allocator. |
---|
223 | |
---|
224 | VALUE CONSTRAINTS: |
---|
225 | The value of this configuration option shall be defined to a macro which |
---|
226 | accepts exactly one parameter and returns an unsigned integer. The |
---|
227 | parameter will be an allocation size and the macro shall return this size |
---|
228 | plus the overhead of the allocator to manage an allocation request for this |
---|
229 | size. |
---|
230 | |
---|
231 | DESCRIPTION: |
---|
232 | The value of this configuration option is used to calculate the task stack |
---|
233 | space size. |
---|
234 | |
---|
235 | NOTES: |
---|
236 | This configuration option may be used if a custom task stack allocator is |
---|
237 | configured, see :ref:`CONFIGURE_TASK_STACK_ALLOCATOR`. |
---|