source: rtems/cpukit/include/rtems/rtems/messagedata.h @ 21275b58

Last change on this file since 21275b58 was 21275b58, checked in by Sebastian Huber <sebastian.huber@…>, on Nov 22, 2018 at 6:14:51 PM

score: Static Objects_Information initialization

Statically allocate the objects information together with the initial
set of objects either via <rtems/confdefs.h>. Provide default object
informations with zero objects via librtemscpu.a. This greatly
simplifies the workspace size estimate. RTEMS applications which do not
use the unlimited objects option are easier to debug since all objects
reside now in statically allocated objects of the right types.

Close #3621.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup ClassicMessageQueue
5 *
6 * @brief Classic Message Queue Manager API
7 */
8
9/* COPYRIGHT (c) 1989-2013.
10 * On-Line Applications Research Corporation (OAR).
11 *
12 * The license and distribution terms for this file may be
13 * found in the file LICENSE in this distribution or at
14 * http://www.rtems.org/license/LICENSE.
15 */
16
17#ifndef _RTEMS_RTEMS_MESSAGEDATA_H
18#define _RTEMS_RTEMS_MESSAGEDATA_H
19
20#include <rtems/rtems/message.h>
21#include <rtems/score/coremsg.h>
22#include <rtems/score/objectdata.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/**
29 * @addtogroup ClassicMessageQueueImpl
30 *
31 * @{
32 */
33
34/**
35 *  The following records define the control block used to manage
36 *  each message queue.
37 */
38typedef struct {
39  /** This field is the inherited object characteristics. */
40  Objects_Control             Object;
41  /** This field is the instance of the SuperCore Message Queue. */
42  CORE_message_queue_Control  message_queue;
43  /** This field is the attribute set as defined by the API. */
44  rtems_attribute             attribute_set;
45}   Message_queue_Control;
46
47/**
48 * @brief The Classic Message Queue objects information.
49 */
50extern Objects_Information _Message_queue_Information;
51
52#if defined(RTEMS_MULTIPROCESSING)
53/**
54 *  @brief _Message_queue_MP_Send_extract_proxy
55 *
56 *  This routine is invoked when a task is deleted and it
57 *  has a proxy which must be removed from a thread queue and
58 *  the remote node must be informed of this.
59 */
60void _Message_queue_MP_Send_extract_proxy (
61  Thread_Control *the_thread,
62  Objects_Id      id
63);
64#endif
65
66/**
67 * @brief Macro to define the objects information for the Classic Message Queue
68 * objects.
69 *
70 * This macro should only be used by <rtems/confdefs.h>.
71 *
72 * @param max The configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag
73 * may be set).
74 */
75#define MESSAGE_QUEUE_INFORMATION_DEFINE( max ) \
76  OBJECTS_INFORMATION_DEFINE( \
77    _Message_queue, \
78    OBJECTS_CLASSIC_API, \
79    OBJECTS_RTEMS_MESSAGE_QUEUES, \
80    Message_queue_Control, \
81    max, \
82    OBJECTS_NO_STRING_NAME, \
83    _Message_queue_MP_Send_extract_proxy \
84  )
85
86/** @} */
87
88#ifdef __cplusplus
89}
90#endif
91
92#endif
93/* end of include file */
Note: See TracBrowser for help on using the repository browser.