summaryrefslogtreecommitdiffstats
path: root/c-user/config/task-stack-alloc.rst
blob: 513815cb985399b021e4c474d8af15807b48f068 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
.. SPDX-License-Identifier: CC-BY-SA-4.0

.. Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)

Task Stack Allocator Configuration
==================================

This section describes configuration options related to the task stack
allocator.  RTEMS allows the application or BSP to define its own allocation
and deallocation methods for task stacks. This can be used to place task stacks
in special areas of memory or to utilize a Memory Management Unit so that stack
overflows are detected in hardware.

.. index:: CONFIGURE_TASK_STACK_ALLOCATOR
.. index:: task stack allocator

.. _CONFIGURE_TASK_STACK_ALLOCATOR:

CONFIGURE_TASK_STACK_ALLOCATOR
------------------------------

CONSTANT:
    ``CONFIGURE_TASK_STACK_ALLOCATOR``

OPTION TYPE:
    This configuration option is an initializer define.

DEFAULT VALUE:
    The default value is ``_Workspace_Allocate``, which indicates that task
    stacks will be allocated from the RTEMS Workspace.

VALUE CONSTRAINTS:
    The value of this configuration option shall be defined to a valid function
    pointer of the type ``void *( *allocate )( size_t )``.

DESCRIPTION:
    The value of this configuration option initializes the stack allocator
    allocate handler.

NOTES:
    A correctly configured system shall configure the following to be consistent:

    - :ref:`CONFIGURE_TASK_STACK_ALLOCATOR_INIT`

    - `CONFIGURE_TASK_STACK_ALLOCATOR`

    - :ref:`CONFIGURE_TASK_STACK_DEALLOCATOR`

.. index:: CONFIGURE_TASK_STACK_ALLOCATOR_INIT

.. _CONFIGURE_TASK_STACK_ALLOCATOR_INIT:

CONFIGURE_TASK_STACK_ALLOCATOR_INIT
-----------------------------------

CONSTANT:
    ``CONFIGURE_TASK_STACK_ALLOCATOR_INIT``

OPTION TYPE:
    This configuration option is an initializer define.

DEFAULT VALUE:
    The default value is ``NULL``.

VALUE CONSTRAINTS:
    The value of this configuration option shall be defined to a valid function
    pointer of the type ``void ( *initialize )( size_t )`` or to ``NULL``.

DESCRIPTION:
    The value of this configuration option initializes the stack allocator
    initialization handler.

NOTES:
    A correctly configured system shall configure the following to be consistent:

    - `CONFIGURE_TASK_STACK_ALLOCATOR_INIT`

    - :ref:`CONFIGURE_TASK_STACK_ALLOCATOR`

    - :ref:`CONFIGURE_TASK_STACK_DEALLOCATOR`

.. index:: CONFIGURE_TASK_STACK_DEALLOCATOR
.. index:: task stack deallocator

.. _CONFIGURE_TASK_STACK_DEALLOCATOR:

CONFIGURE_TASK_STACK_DEALLOCATOR
--------------------------------

CONSTANT:
    ``CONFIGURE_TASK_STACK_DEALLOCATOR``

OPTION TYPE:
    This configuration option is an initializer define.

DEFAULT VALUE:
    The default value is ``_Workspace_Free``, which indicates that task stacks
    will be allocated from the RTEMS Workspace.

VALUE CONSTRAINTS:
    The value of this configuration option shall be defined to a valid function
    pointer of the type ``void ( *deallocate )( void * )``.

DESCRIPTION:
    The value of this configuration option initializes the stack allocator
    deallocate handler.

NOTES:
    A correctly configured system shall configure the following to be consistent:

    - :ref:`CONFIGURE_TASK_STACK_ALLOCATOR_INIT`

    - :ref:`CONFIGURE_TASK_STACK_ALLOCATOR`

    - `CONFIGURE_TASK_STACK_DEALLOCATOR`