1 /*
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  */
7 #ifndef _UAPI_LINUX_SEM_H
8 #define _UAPI_LINUX_SEM_H
9 #include <linux/ipc.h>
10 #define SEM_UNDO 0x1000
11 #define GETPID 11
12 #define GETVAL 12
13 #define GETALL 13
14 #define GETNCNT 14
15 #define GETZCNT 15
16 #define SETVAL 16
17 #define SETALL 17
18 #define SEM_STAT 18
19 #define SEM_INFO 19
20 #define SEM_STAT_ANY 20
21 struct __kernel_legacy_semid_ds {
22   struct __kernel_legacy_ipc_perm sem_perm;
23   __kernel_old_time_t sem_otime;
24   __kernel_old_time_t sem_ctime;
25   struct sem * sem_base;
26   struct sem_queue * sem_pending;
27   struct sem_queue * * sem_pending_last;
28   struct sem_undo * undo;
29   unsigned short sem_nsems;
30 };
31 #include <asm/sembuf.h>
32 struct sembuf {
33   unsigned short sem_num;
34   short sem_op;
35   short sem_flg;
36 };
37 union __kernel_legacy_semun {
38   int val;
39   struct __kernel_legacy_semid_ds  * buf;
40   unsigned short  * array;
41   struct seminfo  * __buf;
42   void  * __pad;
43 };
44 struct seminfo {
45   int semmap;
46   int semmni;
47   int semmns;
48   int semmnu;
49   int semmsl;
50   int semopm;
51   int semume;
52   int semusz;
53   int semvmx;
54   int semaem;
55 };
56 #define SEMMNI 32000
57 #define SEMMSL 32000
58 #define SEMMNS (SEMMNI * SEMMSL)
59 #define SEMOPM 500
60 #define SEMVMX 32767
61 #define SEMAEM SEMVMX
62 #define SEMUME SEMOPM
63 #define SEMMNU SEMMNS
64 #define SEMMAP SEMMNS
65 #define SEMUSZ 20
66 #endif
67