c-user: Modify CONFIGURE_INTERRUPT_STACK_SIZE

Use CPU_STACK_MINIMUM_SIZE instead of CONFIGURE_MINIMUM_TASK_STACK_SIZE
to set the default value.

Clarify documentation.

Update #3480.
This commit is contained in:
Sebastian Huber 2018-10-22 14:22:45 +02:00
parent 969e60e596
commit 05a5366469

View File

@ -1656,6 +1656,10 @@ NOTES:
:ref:`CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE <CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE>` :ref:`CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE <CONFIGURE_MINIMUM_POSIX_THREAD_STACK_SIZE>`
configuration option. configuration option.
In releases before RTEMS 5.1 the ``CONFIGURE_MINIMUM_TASK_STACK_SIZE`` was
used to define the default value of :ref:`CONFIGURE_INTERRUPT_STACK_SIZE
<CONFIGURE_INTERRUPT_STACK_SIZE>`.
.. index:: CONFIGURE_INTERRUPT_STACK_SIZE .. index:: CONFIGURE_INTERRUPT_STACK_SIZE
.. index:: interrupt stack size .. index:: interrupt stack size
@ -1668,27 +1672,40 @@ CONSTANT:
``CONFIGURE_INTERRUPT_STACK_SIZE`` ``CONFIGURE_INTERRUPT_STACK_SIZE``
DATA TYPE: DATA TYPE:
Unsigned integer (``uint32_t``). Unsigned integer.
RANGE: RANGE:
Positive. Positive.
DEFAULT VALUE: DEFAULT VALUE:
The default value is CONFIGURE_MINIMUM_TASK_STACK_SIZE, which is the The default value is ``BSP_INTERRUPT_STACK_SIZE`` in case it is defined,
minimum interrupt stack size. otherwise the default value is ``CPU_STACK_MINIMUM_SIZE``.
DESCRIPTION: DESCRIPTION:
``CONFIGURE_INTERRUPT_STACK_SIZE`` is set to the size of the interrupt The ``CONFIGURE_INTERRUPT_STACK_SIZE`` configuration option defines the
stack. The interrupt stack size is often set by the BSP but since this size of an interrupt stack in bytes.
memory may be allocated from the RTEMS Workspace, it must be accounted for.
NOTES: NOTES:
In some BSPs, changing this constant does NOT change the size of the The interrupt stack size must be aligned according to
interrupt stack, only the amount of memory reserved for it. ``CPU_INTERRUPT_STACK_ALIGNMENT``.
Patches which result in this constant only being used in memory There is one interrupt stack available for each configured processor
calculations when the interrupt stack is intended to be allocated from the (:ref:`CONFIGURE_MAXIMUM_PROCESSORS <CONFIGURE_MAXIMUM_PROCESSORS>`). The
RTEMS Workspace would be welcomed by the RTEMS Project. interrupt stack areas are statically allocated in a special linker section
(``.rtemsstack.interrupt``). The placement of this linker section is
BSP-specific.
Some BSPs use the interrupt stack as the initialization stack which is used
to perform the sequential system initialization before the multithreading
is started.
The interrupt stacks are covered by the :ref:`stack checker
<CONFIGURE_STACK_CHECKER_ENABLED>`. However, using a too small interrupt
stack size may still result in undefined behaviour.
In releases before RTEMS 5.1 the default value was
:ref:`CONFIGURE_MINIMUM_TASK_STACK_SIZE
<CONFIGURE_MINIMUM_TASK_STACK_SIZE>` instead of ``CPU_STACK_MINIMUM_SIZE``.
.. index:: CONFIGURE_EXTRA_TASK_STACKS .. index:: CONFIGURE_EXTRA_TASK_STACKS
.. index:: memory for task tasks .. index:: memory for task tasks