Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | #ifndef _SYS_MSG_H |
| 2 | #define _SYS_MSG_H |
| 3 | |
Rich Felker | 3ed8c9f | 2011-11-10 20:40:06 -0500 | [diff] [blame] | 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 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 | |
Rich Felker | 07e865c | 2011-04-13 16:45:43 -0400 | [diff] [blame] | 21 | #include <bits/msg.h> |
| 22 | |
| 23 | #define __msg_cbytes msg_cbytes |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 24 | |
| 25 | #define MSG_NOERROR 010000 |
Rich Felker | 4ce6bd8 | 2013-08-14 02:48:11 -0400 | [diff] [blame^] | 26 | #define MSG_EXCEPT 020000 |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 27 | |
Rich Felker | 07e865c | 2011-04-13 16:45:43 -0400 | [diff] [blame] | 28 | #define MSG_STAT 11 |
| 29 | #define MSG_INFO 12 |
| 30 | |
| 31 | struct msginfo { |
| 32 | int msgpool, msgmap, msgmax, msgmnb, msgmni, msgssz, msgtql; |
| 33 | unsigned short msgseg; |
| 34 | }; |
| 35 | |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 36 | int msgctl (int, int, struct msqid_ds *); |
| 37 | int msgget (key_t, int); |
Rich Felker | 104d013 | 2011-04-06 00:02:20 -0400 | [diff] [blame] | 38 | ssize_t msgrcv (int, void *, size_t, long, int); |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 39 | int msgsnd (int, const void *, size_t, int); |
| 40 | |
rofl0r | 0182c28 | 2012-12-06 20:03:04 +0100 | [diff] [blame] | 41 | #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
| 42 | struct msgbuf { |
| 43 | long mtype; |
| 44 | char mtext[1]; |
| 45 | }; |
| 46 | #endif |
| 47 | |
Rich Felker | 3ed8c9f | 2011-11-10 20:40:06 -0500 | [diff] [blame] | 48 | #ifdef __cplusplus |
| 49 | } |
| 50 | #endif |
| 51 | |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 52 | #endif |