• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _SYS_MSG_H
2 #define _SYS_MSG_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #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 
18 typedef unsigned long msgqnum_t;
19 typedef unsigned long msglen_t;
20 
21 #include <bits/msg.h>
22 
23 #define __msg_cbytes msg_cbytes
24 
25 #define MSG_NOERROR 010000
26 #define MSG_EXCEPT  020000
27 
28 #define MSG_STAT (11 | (IPC_STAT & 0x100))
29 #define MSG_INFO 12
30 #define MSG_STAT_ANY (13 | (IPC_STAT & 0x100))
31 
32 struct msginfo {
33 	int msgpool, msgmap, msgmax, msgmnb, msgmni, msgssz, msgtql;
34 	unsigned short msgseg;
35 };
36 
37 int msgctl (int, int, struct msqid_ds *);
38 int msgget (key_t, int);
39 ssize_t msgrcv (int, void *, size_t, long, int);
40 int msgsnd (int, const void *, size_t, int);
41 
42 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
43 struct msgbuf {
44 	long mtype;
45 	char mtext[1];
46 };
47 #endif
48 
49 #ifdef __cplusplus
50 }
51 #endif
52 
53 #endif
54