blob: be6afc34fb7ff66f2a5a4af623605ddccca9d84b [file] [log] [blame]
Rich Felker0b44a032011-02-12 00:22:29 -05001#ifndef _SYS_MSG_H
2#define _SYS_MSG_H
3
Rich Felker3ed8c9f2011-11-10 20:40:06 -05004#ifdef __cplusplus
5extern "C" {
6#endif
7
Rich Felker0b44a032011-02-12 00:22:29 -05008#include <sys/ipc.h>
9
10#define __NEED_pid_t
11#define __NEED_key_t
12#define __NEED_time_t
13#define __NEED_size_t
14#define __NEED_ssize_t
15
16#include <bits/alltypes.h>
17
18typedef unsigned long msgqnum_t;
19typedef unsigned long msglen_t;
20
Rich Felker07e865c2011-04-13 16:45:43 -040021#include <bits/msg.h>
22
23#define __msg_cbytes msg_cbytes
Rich Felker0b44a032011-02-12 00:22:29 -050024
25#define MSG_NOERROR 010000
Rich Felker4ce6bd82013-08-14 02:48:11 -040026#define MSG_EXCEPT 020000
Rich Felker0b44a032011-02-12 00:22:29 -050027
Rich Felker07e865c2011-04-13 16:45:43 -040028#define MSG_STAT 11
29#define MSG_INFO 12
Szabolcs Nagyaf550702018-06-09 21:06:58 +000030#define MSG_STAT_ANY 13
Rich Felker07e865c2011-04-13 16:45:43 -040031
32struct msginfo {
33 int msgpool, msgmap, msgmax, msgmnb, msgmni, msgssz, msgtql;
34 unsigned short msgseg;
35};
36
Rich Felker0b44a032011-02-12 00:22:29 -050037int msgctl (int, int, struct msqid_ds *);
38int msgget (key_t, int);
Rich Felker104d0132011-04-06 00:02:20 -040039ssize_t msgrcv (int, void *, size_t, long, int);
Rich Felker0b44a032011-02-12 00:22:29 -050040int msgsnd (int, const void *, size_t, int);
41
rofl0r0182c282012-12-06 20:03:04 +010042#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
43struct msgbuf {
44 long mtype;
45 char mtext[1];
46};
47#endif
48
Rich Felker3ed8c9f2011-11-10 20:40:06 -050049#ifdef __cplusplus
50}
51#endif
52
Rich Felker0b44a032011-02-12 00:22:29 -050053#endif