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