blob: 596378e8a7528f3affdd110e706d42c2eceaa1b4 (
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
|
SPDX-License-Identifier: CC-BY-SA-4.0
active: true
appl-config-option-type: integer
appl-config-option-default-value: 0
appl-config-option-description: |
The value of this configuration option defines the number of bytes reserved
for message queue buffers in the RTEMS Workspace.
appl-config-option-index:
- configure message queue buffer memory
- CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE
- memory for a single message queue's buffers
appl-config-option-name: CONFIGURE_MESSAGE_BUFFER_MEMORY
appl-config-option-notes: |
The configuration options :ref:`CONFIGURE_MAXIMUM_MESSAGE_QUEUES` and
:ref:`CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES` define only how many message
queues can be created by the application. The memory for the message
buffers is configured by this option. For each message queue you have to
reserve some memory for the message buffers. The size dependes on the
maximum number of pending messages and the maximum size of the messages of
a message queue. Use the ``CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE()`` macro
to specify the message buffer memory for each message queue and sum them up
to define the value for ``CONFIGURE_MAXIMUM_MESSAGE_QUEUES``.
The interface for the ``CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE()`` help
macro is as follows:
.. code-block:: c
CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( max_messages, max_msg_size )
Where ``max_messages`` is the maximum number of pending messages and
``max_msg_size`` is the maximum size in bytes of the messages of the
corresponding message queue. Both parameters shall be compile time
constants. Not using this help macro (e.g. just using
``max_messages * max_msg_size``) may result in an underestimate of the
RTEMS Workspace size.
The following example illustrates how the
`CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE()` help macro can be used to assist in
calculating the message buffer memory required. In this example, there are
two message queues used in this application. The first message queue has a
maximum of 24 pending messages with the message structure defined by the
type ``one_message_type``. The other message queue has a maximum of 500
pending messages with the message structure defined by the type
``other_message_type``.
.. code-block:: c
#define CONFIGURE_MESSAGE_BUFFER_MEMORY ( \
CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \
24, \
sizeof( one_message_type ) \
) \
+ CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE( \
500, \
sizeof( other_message_type ) \
) \
)
appl-config-option-constraint:
min: 0
custom:
- |
It must be small enough so that the RTEMS Workspace size calculation
carried out by ``<rtems/confdefs.h>`` does not overflow an integer of type
``uintptr_t``.
appl-config-option-range: |
undefined (zero) or calculation resulting in a positive integer
copyrights:
- Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)
derived: false
enabled-by: []
header: ''
interface-type: appl-config-option
level: 1.76
links:
- RTEMS-ACFG-GENERAL: B6rbi_eXOZOzB3o8-DYzrc0JmF7ON1adlcZj3dQd6WY=
normative: true
ref: ''
reviewed: zVffxJPd0q-aQH6OwzO9GVd18FV5DgsvRbQPfts7WA0=
text: ''
type: interface
|