blob: 89d8d385c0cd0f292c16af190c78819f8bd1335b [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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 Cheng655a7c02013-10-16 16:09:24 -070023#define MSG_INFO 12
24#define MSG_NOERROR 010000
25#define MSG_EXCEPT 020000
26#define MSG_COPY 040000
Elliott Hughes7c59f3f2016-08-16 18:14:26 -070027struct __kernel_legacy_msqid_ds {
28 struct __kernel_legacy_ipc_perm msg_perm;
Tao Baod7db5942015-01-28 10:07:51 -080029 struct msg * msg_first;
30 struct msg * msg_last;
Tao Baod7db5942015-01-28 10:07:51 -080031 __kernel_time_t msg_stime;
32 __kernel_time_t msg_rtime;
33 __kernel_time_t msg_ctime;
34 unsigned long msg_lcbytes;
Tao Baod7db5942015-01-28 10:07:51 -080035 unsigned long msg_lqbytes;
36 unsigned short msg_cbytes;
37 unsigned short msg_qnum;
38 unsigned short msg_qbytes;
Tao Baod7db5942015-01-28 10:07:51 -080039 __kernel_ipc_pid_t msg_lspid;
40 __kernel_ipc_pid_t msg_lrpid;
Ben Cheng655a7c02013-10-16 16:09:24 -070041};
42#include <asm/msgbuf.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070043struct msgbuf {
Tao Baod7db5942015-01-28 10:07:51 -080044 __kernel_long_t mtype;
45 char mtext[1];
Ben Cheng655a7c02013-10-16 16:09:24 -070046};
Ben Cheng655a7c02013-10-16 16:09:24 -070047struct msginfo {
Tao Baod7db5942015-01-28 10:07:51 -080048 int msgpool;
49 int msgmap;
50 int msgmax;
Tao Baod7db5942015-01-28 10:07:51 -080051 int msgmnb;
52 int msgmni;
53 int msgssz;
54 int msgtql;
Tao Baod7db5942015-01-28 10:07:51 -080055 unsigned short msgseg;
Ben Cheng655a7c02013-10-16 16:09:24 -070056};
Christopher Ferris05d08e92016-02-04 13:16:38 -080057#define MSGMNI 32000
Ben Cheng655a7c02013-10-16 16:09:24 -070058#define MSGMAX 8192
59#define MSGMNB 16384
60#define MSGPOOL (MSGMNI * MSGMNB / 1024)
61#define MSGTQL MSGMNB
Ben Cheng655a7c02013-10-16 16:09:24 -070062#define MSGMAP MSGMNB
63#define MSGSSZ 16
64#define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ)
65#define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff)
Ben Cheng655a7c02013-10-16 16:09:24 -070066#endif