Changeset 03a735f in rtems-docs


Ignore:
Timestamp:
Mar 12, 2020, 12:40:45 PM (4 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, master
Children:
b34f2de
Parents:
a7991ae
git-author:
Sebastian Huber <sebastian.huber@…> (03/12/20 12:40:45)
git-committer:
Sebastian Huber <sebastian.huber@…> (03/13/20 12:20:20)
Message:

c-user: Clarify message buffer configuration

The help macro CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE() is not a
configuration option. Move it into the documentatation of the
CONFIGURE_MESSAGE_BUFFER_MEMORY configuration option. Move this option
to the general system configuration group.

Update #3836.

Location:
c-user/config
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • c-user/config/general.rst

    ra7991ae r03a735f  
    325325    not account for all message queue buffers or task stacks.
    326326
     327.. index:: CONFIGURE_MESSAGE_BUFFER_MEMORY
     328.. index:: configure message queue buffer memory
     329.. index:: CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE
     330.. index:: memory for a single message queue's buffers
     331
     332.. _CONFIGURE_MESSAGE_BUFFER_MEMORY:
     333
     334CONFIGURE_MESSAGE_BUFFER_MEMORY
     335-------------------------------
     336
     337CONSTANT:
     338    ``CONFIGURE_MESSAGE_BUFFER_MEMORY``
     339
     340DATA TYPE:
     341    integer summation macro
     342
     343RANGE:
     344    undefined (zero) or calculation resulting in a positive integer
     345
     346DEFAULT VALUE:
     347    The default value is zero.
     348
     349DESCRIPTION:
     350    The value of this configuration option defines the number of bytes
     351    resereved for message queue buffers in the RTEMS Workspace.
     352
     353NOTES:
     354    The configuration options :ref:`CONFIGURE_MAXIMUM_MESSAGE_QUEUES` and
     355    :ref:`CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES` define only how many message
     356    queues can be created by the application.  The memory for the message
     357    buffers is configured by this option.  For each message queue you have to
     358    reserve some memory for the message buffers.  The size dependes on the
     359    maximum number of pending messages and the maximum size of the messages of
     360    a message queue.  Use the ``CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE()`` macro
     361    to specify the message buffer memory for each message queue and sum them up
     362    to define the value for ``CONFIGURE_MAXIMUM_MESSAGE_QUEUES``.
     363
     364    The interface for the ``CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE()`` help
     365    macro is as follows:
     366
     367    .. code-block:: c
     368
     369        CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( max_messages, max_msg_size )
     370
     371    Where ``max_messages`` is the maximum number of pending messages and
     372    ``max_msg_size`` is the maximum size in bytes of the messages of the
     373    corresponding message queue.  Both parameters shall be compile time
     374    constants.  Not using this help macro (e.g. just using
     375    ``max_messages * max_msg_size``) may result in an underestimate of the
     376    RTEMS Workspace size.
     377
     378    The following example illustrates how the
     379    `CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE()` help macro can be used to assist in
     380    calculating the message buffer memory required.  In this example, there are
     381    two message queues used in this application.  The first message queue has a
     382    maximum of 24 pending messages with the message structure defined by the
     383    type ``one_message_type``.  The other message queue has a maximum of 500
     384    pending messages with the message structure defined by the type
     385    ``other_message_type``.
     386
     387    .. code-block:: c
     388
     389        #define CONFIGURE_MESSAGE_BUFFER_MEMORY ( \
     390            CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \
     391              24, \
     392              sizeof( one_message_type ) \
     393            ) \
     394            + CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \
     395              500, \
     396              sizeof( other_message_type ) \
     397            ) \
     398          )
     399
    327400.. index:: CONFIGURE_MICROSECONDS_PER_TICK
    328401.. index:: tick quantum
  • c-user/config/index.rst

    ra7991ae r03a735f  
    1818    posix-init-thread
    1919    task-stack-alloc
    20     msg-queue-buffer
    2120    filesystem
    2221    bdbuf
Note: See TracChangeset for help on using the changeset viewer.