1mqueue.h(0P)               POSIX Programmer's Manual              mqueue.h(0P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       mqueue.h — message queues (REALTIME)
14

SYNOPSIS

16       #include <mqueue.h>
17

DESCRIPTION

19       The <mqueue.h> header shall define the mqd_t type, which  is  used  for
20       message queue descriptors. This is not an array type.
21
22       The  <mqueue.h>  header  shall  define  the pthread_attr_t, size_t, and
23       ssize_t types as described in <sys/types.h>.
24
25       The <mqueue.h> header shall define the  struct  timespec  structure  as
26       described in <time.h>.
27
28       The  tag  sigevent  shall be declared as naming an incomplete structure
29       type, the contents of which are described in the <signal.h> header.
30
31       The <mqueue.h> header shall define the mq_attr structure, which is used
32       in  getting  and  setting the attributes of a message queue. Attributes
33       are initially set when the message queue is created. An mq_attr  struc‐
34       ture shall have at least the following fields:
35
36           long    mq_flags    Message queue flags.
37           long    mq_maxmsg   Maximum number of messages.
38           long    mq_msgsize  Maximum message size.
39           long    mq_curmsgs  Number of messages currently queued.
40
41       The following shall be declared as functions and may also be defined as
42       macros. Function prototypes shall be provided.
43
44           int      mq_close(mqd_t);
45           int      mq_getattr(mqd_t, struct mq_attr *);
46           int      mq_notify(mqd_t, const struct sigevent *);
47           mqd_t    mq_open(const char *, int, ...);
48           ssize_t  mq_receive(mqd_t, char *, size_t, unsigned *);
49           int      mq_send(mqd_t, const char *, size_t, unsigned);
50           int      mq_setattr(mqd_t, const struct mq_attr *restrict,
51                        struct mq_attr *restrict);
52           ssize_t  mq_timedreceive(mqd_t, char *restrict, size_t,
53                        unsigned *restrict, const struct timespec *restrict);
54           int      mq_timedsend(mqd_t, const char *, size_t, unsigned,
55                        const struct timespec *);
56           int      mq_unlink(const char *);
57
58       Inclusion of the <mqueue.h> header may make visible symbols defined  in
59       the headers <fcntl.h>, <signal.h>, and <time.h>.
60
61       The following sections are informative.
62

APPLICATION USAGE

64       None.
65

RATIONALE

67       None.
68

FUTURE DIRECTIONS

70       None.
71

SEE ALSO

73       <fcntl.h>, <signal.h>, <sys_types.h>, <time.h>
74
75       The System Interfaces volume of POSIX.1‐2008, mq_close(), mq_getattr(),
76       mq_notify(),   mq_open(),   mq_receive(),   mq_send(),    mq_setattr(),
77       mq_unlink()
78
80       Portions  of  this text are reprinted and reproduced in electronic form
81       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
82       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
83       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
84       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
85       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
86       event of any discrepancy between this version and the original IEEE and
87       The Open Group Standard, the original IEEE and The Open Group  Standard
88       is  the  referee document. The original Standard can be obtained online
89       at http://www.unix.org/online.html .
90
91       Any typographical or formatting errors that appear  in  this  page  are
92       most likely to have been introduced during the conversion of the source
93       files to man page format. To report such errors,  see  https://www.ker
94       nel.org/doc/man-pages/reporting_bugs.html .
95
96
97
98IEEE/The Open Group                  2013                         mqueue.h(0P)
Impressum