1sys_msg.h(0P) POSIX Programmer's Manual sys_msg.h(0P)
2
3
4
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
12 sys/msg.h — XSI message queue structures
13
15 #include <sys/msg.h>
16
18 The <sys/msg.h> header shall define the following data types through
19 typedef:
20
21 msgqnum_t Used for the number of messages in the message queue.
22
23 msglen_t Used for the number of bytes allowed in a message queue.
24
25 These types shall be unsigned integer types that are able to store val‐
26 ues at least as large as a type unsigned short.
27
28 The <sys/msg.h> header shall define the following symbolic constant as
29 a message operation flag:
30
31 MSG_NOERROR No error if big message.
32
33 The <sys/msg.h> header shall define the msqid_ds structure, which shall
34 include the following members:
35
36
37 struct ipc_perm msg_perm Operation permission structure.
38 msgqnum_t msg_qnum Number of messages currently on queue.
39 msglen_t msg_qbytes Maximum number of bytes allowed on queue.
40 pid_t msg_lspid Process ID of last msgsnd().
41 pid_t msg_lrpid Process ID of last msgrcv().
42 time_t msg_stime Time of last msgsnd().
43 time_t msg_rtime Time of last msgrcv().
44 time_t msg_ctime Time of last change.
45
46 The <sys/msg.h> header shall define the pid_t, size_t, ssize_t, and
47 time_t types as described in <sys/types.h>.
48
49 The following shall be declared as functions and may also be defined as
50 macros. Function prototypes shall be provided.
51
52
53 int msgctl(int, int, struct msqid_ds *);
54 int msgget(key_t, int);
55 ssize_t msgrcv(int, void *, size_t, long, int);
56 int msgsnd(int, const void *, size_t, int);
57
58 In addition, the <sys/msg.h> header shall include the <sys/ipc.h>
59 header.
60
61 The following sections are informative.
62
64 None.
65
67 None.
68
70 None.
71
73 <sys_ipc.h>, <sys_types.h>
74
75 The System Interfaces volume of POSIX.1‐2017, msgctl(), msgget(),
76 msgrcv(), msgsnd()
77
79 Portions of this text are reprinted and reproduced in electronic form
80 from IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
81 table Operating System Interface (POSIX), The Open Group Base Specifi‐
82 cations Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of
83 Electrical and Electronics Engineers, Inc and The Open Group. In the
84 event of any discrepancy between this version and the original IEEE and
85 The Open Group Standard, the original IEEE and The Open Group Standard
86 is the referee document. The original Standard can be obtained online
87 at http://www.opengroup.org/unix/online.html .
88
89 Any typographical or formatting errors that appear in this page are
90 most likely to have been introduced during the conversion of the source
91 files to man page format. To report such errors, see https://www.ker‐
92 nel.org/doc/man-pages/reporting_bugs.html .
93
94
95
96IEEE/The Open Group 2017 sys_msg.h(0P)