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

NAME

12       mqueue.h — message queues (REALTIME)
13

SYNOPSIS

15       #include <mqueue.h>
16

DESCRIPTION

18       The <mqueue.h> header shall define the mqd_t type, which  is  used  for
19       message queue descriptors. This is not an array type.
20
21       The  <mqueue.h>  header  shall  define  the pthread_attr_t, size_t, and
22       ssize_t types as described in <sys/types.h>.
23
24       The <mqueue.h> header shall define the  struct  timespec  structure  as
25       described in <time.h>.
26
27       The  tag  sigevent  shall be declared as naming an incomplete structure
28       type, the contents of which are described in the <signal.h> header.
29
30       The <mqueue.h> header shall define the mq_attr structure, which is used
31       in  getting  and  setting the attributes of a message queue. Attributes
32       are initially set when the message queue is created. An mq_attr  struc‐
33       ture shall have at least the following fields:
34
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
45           int      mq_close(mqd_t);
46           int      mq_getattr(mqd_t, struct mq_attr *);
47           int      mq_notify(mqd_t, const struct sigevent *);
48           mqd_t    mq_open(const char *, int, ...);
49           ssize_t  mq_receive(mqd_t, char *, size_t, unsigned *);
50           int      mq_send(mqd_t, const char *, size_t, unsigned);
51           int      mq_setattr(mqd_t, const struct mq_attr *restrict,
52                        struct mq_attr *restrict);
53           ssize_t  mq_timedreceive(mqd_t, char *restrict, size_t,
54                        unsigned *restrict, const struct timespec *restrict);
55           int      mq_timedsend(mqd_t, const char *, size_t, unsigned,
56                        const struct timespec *);
57           int      mq_unlink(const char *);
58
59       Inclusion of the <mqueue.h> header may make visible symbols defined  in
60       the headers <fcntl.h>, <signal.h>, and <time.h>.
61
62       The following sections are informative.
63

APPLICATION USAGE

65       None.
66

RATIONALE

68       None.
69

FUTURE DIRECTIONS

71       None.
72

SEE ALSO

74       <fcntl.h>, <signal.h>, <sys_types.h>, <time.h>
75
76       The System Interfaces volume of POSIX.1‐2017, mq_close(), mq_getattr(),
77       mq_notify(),   mq_open(),   mq_receive(),   mq_send(),    mq_setattr(),
78       mq_unlink()
79
81       Portions  of  this text are reprinted and reproduced in electronic form
82       from IEEE Std 1003.1-2017, Standard for Information Technology --  Por‐
83       table  Operating System Interface (POSIX), The Open Group Base Specifi‐
84       cations Issue 7, 2018 Edition, Copyright (C) 2018 by the  Institute  of
85       Electrical  and  Electronics Engineers, Inc and The Open Group.  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.opengroup.org/unix/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                  2017                         mqueue.h(0P)
Impressum