blob: a973814e01444c4f441c958ee6f0c201dbd995d5 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef _UAPI_LINUX_MSG_H
8#define _UAPI_LINUX_MSG_H
9#include <linux/ipc.h>
10#define MSG_STAT 11
Ben Cheng655a7c02013-10-16 16:09:24 -070011#define MSG_INFO 12
Christopher Ferris76a1d452018-06-27 14:12:29 -070012#define MSG_STAT_ANY 13
Ben Cheng655a7c02013-10-16 16:09:24 -070013#define MSG_NOERROR 010000
14#define MSG_EXCEPT 020000
15#define MSG_COPY 040000
Elliott Hughes7c59f3f2016-08-16 18:14:26 -070016struct __kernel_legacy_msqid_ds {
17 struct __kernel_legacy_ipc_perm msg_perm;
Tao Baod7db5942015-01-28 10:07:51 -080018 struct msg * msg_first;
19 struct msg * msg_last;
Christopher Ferrisef80d682020-02-04 16:16:51 -080020 __kernel_old_time_t msg_stime;
21 __kernel_old_time_t msg_rtime;
22 __kernel_old_time_t msg_ctime;
Tao Baod7db5942015-01-28 10:07:51 -080023 unsigned long msg_lcbytes;
Tao Baod7db5942015-01-28 10:07:51 -080024 unsigned long msg_lqbytes;
25 unsigned short msg_cbytes;
26 unsigned short msg_qnum;
27 unsigned short msg_qbytes;
Tao Baod7db5942015-01-28 10:07:51 -080028 __kernel_ipc_pid_t msg_lspid;
29 __kernel_ipc_pid_t msg_lrpid;
Ben Cheng655a7c02013-10-16 16:09:24 -070030};
31#include <asm/msgbuf.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070032struct msgbuf {
Tao Baod7db5942015-01-28 10:07:51 -080033 __kernel_long_t mtype;
34 char mtext[1];
Ben Cheng655a7c02013-10-16 16:09:24 -070035};
Ben Cheng655a7c02013-10-16 16:09:24 -070036struct msginfo {
Tao Baod7db5942015-01-28 10:07:51 -080037 int msgpool;
38 int msgmap;
39 int msgmax;
Tao Baod7db5942015-01-28 10:07:51 -080040 int msgmnb;
41 int msgmni;
42 int msgssz;
43 int msgtql;
Tao Baod7db5942015-01-28 10:07:51 -080044 unsigned short msgseg;
Ben Cheng655a7c02013-10-16 16:09:24 -070045};
Christopher Ferris05d08e92016-02-04 13:16:38 -080046#define MSGMNI 32000
Ben Cheng655a7c02013-10-16 16:09:24 -070047#define MSGMAX 8192
48#define MSGMNB 16384
49#define MSGPOOL (MSGMNI * MSGMNB / 1024)
50#define MSGTQL MSGMNB
Ben Cheng655a7c02013-10-16 16:09:24 -070051#define MSGMAP MSGMNB
52#define MSGSSZ 16
53#define __MSGSEG ((MSGPOOL * 1024) / MSGSSZ)
54#define MSGSEG (__MSGSEG <= 0xffff ? __MSGSEG : 0xffff)
Ben Cheng655a7c02013-10-16 16:09:24 -070055#endif