source: rtems-docs/c-user/config/task-stack-alloc.rst @ 46dbb6d

Last change on this file since 46dbb6d was 46dbb6d, checked in by Sebastian Huber <sebastian.huber@…>, on 10/19/21 at 14:42:04

c-user: Regenerate for IDLE task allocator option

Update #4524.

  • Property mode set to 100644
File size: 7.3 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.. index:: CONFIGURE_TASK_STACK_ALLOCATOR
35.. index:: task stack allocator
36
37.. _CONFIGURE_TASK_STACK_ALLOCATOR:
38
39CONFIGURE_TASK_STACK_ALLOCATOR
40------------------------------
41
42CONSTANT:
43    ``CONFIGURE_TASK_STACK_ALLOCATOR``
44
45OPTION TYPE:
46    This configuration option is an initializer define.
47
48DEFAULT VALUE:
49    The default value is ``_Workspace_Allocate``, which indicates that task
50    stacks will be allocated from the RTEMS Workspace.
51
52VALUE 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
56DESCRIPTION:
57    The value of this configuration option initializes the stack allocator
58    allocate handler.
59
60NOTES:
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
75CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE
76------------------------------------------------
77
78CONSTANT:
79    ``CONFIGURE_TASK_STACK_ALLOCATOR_AVOIDS_WORK_SPACE``
80
81OPTION TYPE:
82    This configuration option is a boolean feature define.
83
84DEFAULT CONFIGURATION:
85    If this configuration option is undefined, then the described feature is not
86    enabled.
87
88DESCRIPTION:
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
92NOTES:
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
103CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE
104---------------------------------------
105
106CONSTANT:
107    ``CONFIGURE_TASK_STACK_ALLOCATOR_FOR_IDLE``
108
109OPTION TYPE:
110    This configuration option is an initializer define.
111
112DEFAULT 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
117VALUE 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
121DESCRIPTION:
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
126NOTES:
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
138CONFIGURE_TASK_STACK_ALLOCATOR_INIT
139-----------------------------------
140
141CONSTANT:
142    ``CONFIGURE_TASK_STACK_ALLOCATOR_INIT``
143
144OPTION TYPE:
145    This configuration option is an initializer define.
146
147DEFAULT VALUE:
148    The default value is `NULL <https://en.cppreference.com/w/c/types/NULL>`_.
149
150VALUE 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
155DESCRIPTION:
156    The value of this configuration option initializes the stack allocator
157    initialization handler.
158
159NOTES:
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
175CONFIGURE_TASK_STACK_DEALLOCATOR
176--------------------------------
177
178CONSTANT:
179    ``CONFIGURE_TASK_STACK_DEALLOCATOR``
180
181OPTION TYPE:
182    This configuration option is an initializer define.
183
184DEFAULT VALUE:
185    The default value is ``_Workspace_Free``, which indicates that task stacks
186    will be allocated from the RTEMS Workspace.
187
188VALUE CONSTRAINTS:
189    The value of this configuration option shall be defined to a valid function
190    pointer of the type ``void ( *deallocate )( void * )``.
191
192DESCRIPTION:
193    The value of this configuration option initializes the stack allocator
194    deallocate handler.
195
196NOTES:
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
212CONFIGURE_TASK_STACK_FROM_ALLOCATOR
213-----------------------------------
214
215CONSTANT:
216    ``CONFIGURE_TASK_STACK_FROM_ALLOCATOR``
217
218OPTION TYPE:
219    This configuration option is an initializer define.
220
221DEFAULT VALUE:
222    The default value is a macro which supports the system heap allocator.
223
224VALUE 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
231DESCRIPTION:
232    The value of this configuration option is used to calculate the task stack
233    space size.
234
235NOTES:
236    This configuration option may be used if a custom task stack allocator is
237    configured, see :ref:`CONFIGURE_TASK_STACK_ALLOCATOR`.
Note: See TracBrowser for help on using the repository browser.