Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _UAPI_LINUX_MSG_H |
| 20 | #define _UAPI_LINUX_MSG_H |
| 21 | #include <linux/ipc.h> |
| 22 | #define MSG_STAT 11 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define MSG_INFO 12 |
Christopher Ferris | 76a1d45 | 2018-06-27 14:12:29 -0700 | [diff] [blame] | 24 | #define MSG_STAT_ANY 13 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 25 | #define MSG_NOERROR 010000 |
| 26 | #define MSG_EXCEPT 020000 |
| 27 | #define MSG_COPY 040000 |
Elliott Hughes | 7c59f3f | 2016-08-16 18:14:26 -0700 | [diff] [blame] | 28 | struct __kernel_legacy_msqid_ds { |
| 29 | struct __kernel_legacy_ipc_perm msg_perm; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 30 | struct msg * msg_first; |
| 31 | struct msg * msg_last; |
Christopher Ferris | d32ca14 | 2020-02-04 16:16:51 -0800 | [diff] [blame] | 32 | __kernel_old_time_t msg_stime; |
| 33 | __kernel_old_time_t msg_rtime; |
| 34 | __kernel_old_time_t msg_ctime; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | unsigned long msg_lcbytes; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 36 | unsigned long msg_lqbytes; |
| 37 | unsigned short msg_cbytes; |
| 38 | unsigned short msg_qnum; |
| 39 | unsigned short msg_qbytes; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 40 | __kernel_ipc_pid_t msg_lspid; |
| 41 | __kernel_ipc_pid_t msg_lrpid; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 42 | }; |
| 43 | #include <asm/msgbuf.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 44 | struct msgbuf { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 45 | __kernel_long_t mtype; |
| 46 | char mtext[1]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 47 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 48 | struct msginfo { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 49 | int msgpool; |
| 50 | int msgmap; |
| 51 | int msgmax; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 52 | int msgmnb; |
| 53 | int msgmni; |
| 54 | int msgssz; |
| 55 | int msgtql; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 56 | unsigned short msgseg; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 57 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 58 | #define MSGMNI 32000 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 59 | #define MSGMAX 8192 |
| 60 | #define MSGMNB 16384 |
| 61 | #define MSGPOOL (MSGMNI * MSGMNB / 1024) |
| 62 | #define MSGTQL MSGMNB |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 63 | #define MSGMAP MSGMNB |
| 64 | #define MSGSSZ 16 |
| 65 | #define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ) |
| 66 | #define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 67 | #endif |