blob: 139f22b7008fab60ad581f9057fdb8367756ba5f [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
30
31struct msginfo {
32 int msgpool, msgmap, msgmax, msgmnb, msgmni, msgssz, msgtql;
33 unsigned short msgseg;
34};
35
Rich Felker0b44a032011-02-12 00:22:29 -050036int msgctl (int, int, struct msqid_ds *);
37int msgget (key_t, int);
Rich Felker104d0132011-04-06 00:02:20 -040038ssize_t msgrcv (int, void *, size_t, long, int);
Rich Felker0b44a032011-02-12 00:22:29 -050039int msgsnd (int, const void *, size_t, int);
40
rofl0r0182c282012-12-06 20:03:04 +010041#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
42struct msgbuf {
43 long mtype;
44 char mtext[1];
45};
46#endif
47
Rich Felker3ed8c9f2011-11-10 20:40:06 -050048#ifdef __cplusplus
49}
50#endif
51
Rich Felker0b44a032011-02-12 00:22:29 -050052#endif