blob: 98ed1bf38c1e8c30a879327e2234b0038fb82df9 [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_SEM_H
20#define _UAPI_LINUX_SEM_H
21#include <linux/ipc.h>
22#define SEM_UNDO 0x1000
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define GETPID 11
24#define GETVAL 12
25#define GETALL 13
26#define GETNCNT 14
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define GETZCNT 15
28#define SETVAL 16
29#define SETALL 17
30#define SEM_STAT 18
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define SEM_INFO 19
Christopher Ferris76a1d452018-06-27 14:12:29 -070032#define SEM_STAT_ANY 20
Elliott Hughes7c59f3f2016-08-16 18:14:26 -070033struct __kernel_legacy_semid_ds {
34 struct __kernel_legacy_ipc_perm sem_perm;
Christopher Ferrisd32ca142020-02-04 16:16:51 -080035 __kernel_old_time_t sem_otime;
36 __kernel_old_time_t sem_ctime;
Tao Baod7db5942015-01-28 10:07:51 -080037 struct sem * sem_base;
38 struct sem_queue * sem_pending;
39 struct sem_queue * * sem_pending_last;
Tao Baod7db5942015-01-28 10:07:51 -080040 struct sem_undo * undo;
41 unsigned short sem_nsems;
Ben Cheng655a7c02013-10-16 16:09:24 -070042};
43#include <asm/sembuf.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070044struct sembuf {
Tao Baod7db5942015-01-28 10:07:51 -080045 unsigned short sem_num;
46 short sem_op;
47 short sem_flg;
Ben Cheng655a7c02013-10-16 16:09:24 -070048};
Elliott Hughes497ad302017-05-18 15:05:26 -070049union __kernel_legacy_semun {
Tao Baod7db5942015-01-28 10:07:51 -080050 int val;
Elliott Hughes7c59f3f2016-08-16 18:14:26 -070051 struct __kernel_legacy_semid_ds __user * buf;
Tao Baod7db5942015-01-28 10:07:51 -080052 unsigned short __user * array;
53 struct seminfo __user * __buf;
54 void __user * __pad;
Ben Cheng655a7c02013-10-16 16:09:24 -070055};
Ben Cheng655a7c02013-10-16 16:09:24 -070056struct seminfo {
Tao Baod7db5942015-01-28 10:07:51 -080057 int semmap;
58 int semmni;
59 int semmns;
Tao Baod7db5942015-01-28 10:07:51 -080060 int semmnu;
61 int semmsl;
62 int semopm;
63 int semume;
Tao Baod7db5942015-01-28 10:07:51 -080064 int semusz;
65 int semvmx;
66 int semaem;
Ben Cheng655a7c02013-10-16 16:09:24 -070067};
Christopher Ferris05d08e92016-02-04 13:16:38 -080068#define SEMMNI 32000
69#define SEMMSL 32000
Tao Baod7db5942015-01-28 10:07:51 -080070#define SEMMNS (SEMMNI * SEMMSL)
Christopher Ferris05d08e92016-02-04 13:16:38 -080071#define SEMOPM 500
Ben Cheng655a7c02013-10-16 16:09:24 -070072#define SEMVMX 32767
73#define SEMAEM SEMVMX
74#define SEMUME SEMOPM
75#define SEMMNU SEMMNS
Ben Cheng655a7c02013-10-16 16:09:24 -070076#define SEMMAP SEMMNS
77#define SEMUSZ 20
78#endif