1<mqueue.h>(P) POSIX Programmer's Manual <mqueue.h>(P)
2
3
4
6 mqueue.h - message queues (REALTIME)
7
9 #include <mqueue.h>
10
12 The <mqueue.h> header shall define the mqd_t type, which is used for
13 message queue descriptors. This is not an array type.
14
15 The <mqueue.h> header shall define the sigevent structure (as described
16 in <signal.h> ) and the mq_attr structure, which is used in getting and
17 setting the attributes of a message queue. Attributes are initially set
18 when the message queue is created. An mq_attr structure shall have at
19 least the following fields:
20
21
22 long mq_flags Message queue flags.
23 long mq_maxmsg Maximum number of messages.
24 long mq_msgsize Maximum message size.
25 long mq_curmsgs Number of messages currently queued.
26
27 The following shall be declared as functions and may also be defined as
28 macros. Function prototypes shall be provided.
29
30
31 int mq_close(mqd_t);
32 int mq_getattr(mqd_t, struct mq_attr *);
33 int mq_notify(mqd_t, const struct sigevent *);
34 mqd_t mq_open(const char *, int, ...);
35 ssize_t mq_receive(mqd_t, char *, size_t, unsigned *);
36 int mq_send(mqd_t, const char *, size_t, unsigned );
37 int mq_setattr(mqd_t, const struct mq_attr *restrict,
38 struct mq_attr *restrict);
39
40 ssize_t mq_timedreceive(mqd_t, char *restrict, size_t,
41 unsigned *restrict, const struct timespec *restrict);
42 int mq_timedsend(mqd_t, const char *, size_t, unsigned ,
43 const struct timespec *);
44
45 int mq_unlink(const char *);
46
47 Inclusion of the <mqueue.h> header may make visible symbols defined in
48 the headers <fcntl.h>, <signal.h>, <sys/types.h>, and <time.h>.
49
50 The following sections are informative.
51
53 None.
54
56 None.
57
59 None.
60
62 <fcntl.h> , <signal.h> , <sys/types.h> , <time.h> , the System Inter‐
63 faces volume of IEEE Std 1003.1-2001, mq_close(), mq_getattr(),
64 mq_notify(), mq_open(), mq_receive(), mq_send(), mq_setattr(), mq_time‐
65 dreceive(), mq_timedsend(), mq_unlink()
66
68 Portions of this text are reprinted and reproduced in electronic form
69 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
70 -- Portable Operating System Interface (POSIX), The Open Group Base
71 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
72 Electrical and Electronics Engineers, Inc and The Open Group. In the
73 event of any discrepancy between this version and the original IEEE and
74 The Open Group Standard, the original IEEE and The Open Group Standard
75 is the referee document. The original Standard can be obtained online
76 at http://www.opengroup.org/unix/online.html .
77
78
79
80IEEE/The Open Group 2003 <mqueue.h>(P)