source: rtems/cpukit/include/rtems/posix/mqueue.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.4 KB
Line 
1/**
2 * @file
3 *
4 * @brief POSIX Message Queues Private Private Support
5 *
6 * This include file contains all the private support information for
7 * POSIX Message Queues.
8 *
9 * The structure of the routines is identical to that of POSIX
10 * Message_queues to leave the option of having unnamed message
11 * queues at a future date.  They are currently not part of the
12 * POSIX standard but unnamed message_queues are.  This is also
13 * the reason for the apparently unnecessary tracking of
14 * the process_shared attribute.  [In addition to the fact that
15 * it would be trivial to add pshared to the mq_attr structure
16 * and have process private message queues.]
17 *
18 * This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
19 * time.
20 */
21
22/*
23 *  COPYRIGHT (c) 1989-2011.
24 *  On-Line Applications Research Corporation (OAR).
25 *
26 *  The license and distribution terms for this file may be
27 *  found in the file LICENSE in this distribution or at
28 *  http://www.rtems.org/license/LICENSE.
29 */
30
31#ifndef _RTEMS_POSIX_MQUEUE_H
32#define _RTEMS_POSIX_MQUEUE_H
33
34#include <rtems/score/coremsg.h>
35#include <rtems/score/objectdata.h>
36
37#include <limits.h>
38#include <mqueue.h>
39#include <signal.h>
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
45/**
46 *  @defgroup POSIX_MQUEUE_P Message Queues Private Support
47 *
48 *  @ingroup POSIXAPI
49 *
50 */
51/**@{**/
52
53/*
54 *  Data Structure used to manage a POSIX message queue
55 */
56
57typedef struct {
58   Objects_Control             Object;
59   CORE_message_queue_Control  Message_queue;
60   bool                        linked;
61   uint32_t                    open_count;
62   struct sigevent             notification;
63   int                         oflag;
64}  POSIX_Message_queue_Control;
65
66/**
67 * @brief The POSIX Message Queue objects information.
68 */
69extern Objects_Information _POSIX_Message_queue_Information;
70
71/**
72 * @brief Macro to define the objects information for the POSIX Message Queue
73 * objects.
74 *
75 * This macro should only be used by <rtems/confdefs.h>.
76 *
77 * @param max The configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag
78 * may be set).
79 */
80#define POSIX_MESSAGE_QUEUE_INFORMATION_DEFINE( max ) \
81  OBJECTS_INFORMATION_DEFINE( \
82    _POSIX_Message_queue, \
83    OBJECTS_POSIX_API, \
84    OBJECTS_POSIX_MESSAGE_QUEUES, \
85    POSIX_Message_queue_Control, \
86    max, \
87    _POSIX_PATH_MAX, \
88    NULL \
89  )
90
91/** @} */
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif
98/*  end of include file */
Note: See TracBrowser for help on using the repository browser.