source: rtems-docs/c-user/config/task-stack-alloc.rst @ 657f744

Last change on this file since 657f744 was 1c8ce33, checked in by Sebastian Huber <sebastian.huber@…>, on 11/16/21 at 07:17:31

c-user: Use rubric for configuration options

Clear the page for each configuration options similar to the directives.

Use a rubric instead of a definition list for the application
configuration options similar to the directive documentation pages. For
direcives and application configuration options use the same rubric
order.

Generalize value constraints to constraints.

This patch does not change hand written content.

  • Property mode set to 100644
File size: 7.6 KB
Line 
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
23Task Stack Allocator Configuration
24==================================
25
26This section describes configuration options related to the task stack
27allocator.  RTEMS allows the application or BSP to define its own allocation
28and deallocation methods for task stacks. This can be used to place task stacks
29in special areas of memory or to utilize a Memory Management Unit so that stack
30overflows are detected in hardware.
31
32.. Generated from spec:/acfg/if/task-stack-allocator
33
34.. raw:: latex
35
36    \clearpage
37
38.. index:: CONFIGURE_TASK_STACK_ALLOCATOR
39.. index:: task stack allocator
40
41.. _CONFIGURE_TASK_STACK_ALLOCATOR:
42
43CONFIGURE_TASK_STACK_ALLOCATOR
44------------------------------
45
46.. rubric:: CONSTANT:
47
48``CONFIGURE_TASK_STACK_ALLOCATOR``
49
50.. rubric:: OPTION TYPE:
51
52This configuration option is an initializer define.
53
54.. rubric:: DEFAULT VALUE:
55
56The default value is ``_Workspace_Allocate``, which indicates that task
57stacks will be allocated from the RTEMS Workspace.
58
59.. rubric:: DESCRIPTION:
60
61The value of this configuration option initializes the stack allocator
62allocate handler.
63
64.. rubric:: NOTES:
65
66A correctly configured system shall configure the following to be consistent:
67
68* :ref:`CONFIGURE_TASK_STACK_ALLOCATOR_INIT`
69
70* ``CONFIGURE_TASK_STACK_ALLOCATOR``
71
72* :ref:`CONFIGURE_TASK_STACK_DEALLOCATOR`
73
74.. rubric:: CONSTRAINTS:
75
76The value of the configuration option shall be defined to a valid function
77pointer of the type ``void *( *allocate )( size_t )``.
78
79.. Generated from spec:/acfg/if/task-stack-no-workspace
80
81.. raw:: latex
82
83    \clearpage
84
85.. index:: CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE
86
87.. _CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE:
88
89CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE
90------------------------------------------------
91
92.. rubric:: CONSTANT:
93
94``CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE``
95
96.. rubric:: OPTION TYPE:
97
98This configuration option is a boolean feature define.
99
100.. rubric:: DEFAULT CONFIGURATION:
101
102If this configuration option is undefined, then the described feature is not
103enabled.
104
105.. rubric:: DESCRIPTION:
106
107In case this configuration option is defined, then the system is informed
108that the task stack allocator does not use the RTEMS Workspace.
109
110.. rubric:: NOTES:
111
112This configuration option may be used if a custom task stack allocator is
113configured, see :ref:`CONFIGURE_TASK_STACK_ALLOCATOR`.
114
115.. Generated from spec:/acfg/if/task-stack-allocator-for-idle
116
117.. raw:: latex
118
119    \clearpage
120
121.. index:: CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE
122.. index:: task stack allocator for IDLE tasks
123
124.. _CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE:
125
126CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE
127---------------------------------------
128
129.. rubric:: CONSTANT:
130
131``CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE``
132
133.. rubric:: OPTION TYPE:
134
135This configuration option is an initializer define.
136
137.. rubric:: DEFAULT VALUE:
138
139The default value is ``_Stack_Allocator_allocate_for_idle_default``, which
140indicates that IDLE task stacks will be allocated from an area statically
141allocated by ``<rtems/confdefs.h>``.
142
143.. rubric:: DESCRIPTION:
144
145The value of this configuration option is the address for the stack allocator
146allocate handler used to allocate the task stack of each
147:term:`IDLE task`.
148
149.. rubric:: NOTES:
150
151This configuration option is independent of the other thread stack allocator
152configuration options.  It is assumed that any memory allocated for the stack
153of an :term:`IDLE task` will not be from the RTEMS Workspace or the
154memory statically allocated by default.
155
156.. rubric:: CONSTRAINTS:
157
158The value of the configuration option shall be defined to a valid function
159pointer of the type ``void *( *allocate )( uint32_t, size_t )``.
160
161.. Generated from spec:/acfg/if/task-stack-allocator-init
162
163.. raw:: latex
164
165    \clearpage
166
167.. index:: CONFIGURE_TASK_STACK_ALLOCATOR_INIT
168
169.. _CONFIGURE_TASK_STACK_ALLOCATOR_INIT:
170
171CONFIGURE_TASK_STACK_ALLOCATOR_INIT
172-----------------------------------
173
174.. rubric:: CONSTANT:
175
176``CONFIGURE_TASK_STACK_ALLOCATOR_INIT``
177
178.. rubric:: OPTION TYPE:
179
180This configuration option is an initializer define.
181
182.. rubric:: DEFAULT VALUE:
183
184The default value is `NULL <https://en.cppreference.com/w/c/types/NULL>`_.
185
186.. rubric:: DESCRIPTION:
187
188The value of this configuration option initializes the stack allocator
189initialization handler.
190
191.. rubric:: NOTES:
192
193A correctly configured system shall configure the following to be consistent:
194
195* ``CONFIGURE_TASK_STACK_ALLOCATOR_INIT``
196
197* :ref:`CONFIGURE_TASK_STACK_ALLOCATOR`
198
199* :ref:`CONFIGURE_TASK_STACK_DEALLOCATOR`
200
201.. rubric:: CONSTRAINTS:
202
203The value of the configuration option shall be defined to a valid function
204pointer of the type ``void ( *initialize )( size_t )`` or to `NULL
205<https://en.cppreference.com/w/c/types/NULL>`_.
206
207.. Generated from spec:/acfg/if/task-stack-deallocator
208
209.. raw:: latex
210
211    \clearpage
212
213.. index:: CONFIGURE_TASK_STACK_DEALLOCATOR
214.. index:: task stack deallocator
215
216.. _CONFIGURE_TASK_STACK_DEALLOCATOR:
217
218CONFIGURE_TASK_STACK_DEALLOCATOR
219--------------------------------
220
221.. rubric:: CONSTANT:
222
223``CONFIGURE_TASK_STACK_DEALLOCATOR``
224
225.. rubric:: OPTION TYPE:
226
227This configuration option is an initializer define.
228
229.. rubric:: DEFAULT VALUE:
230
231The default value is ``_Workspace_Free``, which indicates that task stacks
232will be allocated from the RTEMS Workspace.
233
234.. rubric:: DESCRIPTION:
235
236The value of this configuration option initializes the stack allocator
237deallocate handler.
238
239.. rubric:: NOTES:
240
241A correctly configured system shall configure the following to be consistent:
242
243* :ref:`CONFIGURE_TASK_STACK_ALLOCATOR_INIT`
244
245* :ref:`CONFIGURE_TASK_STACK_ALLOCATOR`
246
247* ``CONFIGURE_TASK_STACK_DEALLOCATOR``
248
249.. rubric:: CONSTRAINTS:
250
251The value of the configuration option shall be defined to a valid function
252pointer of the type ``void ( *deallocate )( void * )``.
253
254.. Generated from spec:/acfg/if/task-stack-from-alloc
255
256.. raw:: latex
257
258    \clearpage
259
260.. index:: CONFIGURE_TASK_STACK_FROM_ALLOCATOR
261.. index:: task stack allocator
262
263.. _CONFIGURE_TASK_STACK_FROM_ALLOCATOR:
264
265CONFIGURE_TASK_STACK_FROM_ALLOCATOR
266-----------------------------------
267
268.. rubric:: CONSTANT:
269
270``CONFIGURE_TASK_STACK_FROM_ALLOCATOR``
271
272.. rubric:: OPTION TYPE:
273
274This configuration option is an initializer define.
275
276.. rubric:: DEFAULT VALUE:
277
278The default value is a macro which supports the system heap allocator.
279
280.. rubric:: DESCRIPTION:
281
282The value of this configuration option is used to calculate the task stack
283space size.
284
285.. rubric:: NOTES:
286
287This configuration option may be used if a custom task stack allocator is
288configured, see :ref:`CONFIGURE_TASK_STACK_ALLOCATOR`.
289
290.. rubric:: CONSTRAINTS:
291
292The value of the configuration option shall be defined to a macro which accepts
293exactly one parameter and returns an unsigned integer.  The parameter will be
294an allocation size and the macro shall return this size plus the overhead of
295the allocator to manage an allocation request for this size.
Note: See TracBrowser for help on using the repository browser.