Home | History | Annotate | Download | only in linux
      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 struct __kernel_legacy_semid_ds {
     33   struct __kernel_legacy_ipc_perm sem_perm;
     34   __kernel_time_t sem_otime;
     35   __kernel_time_t sem_ctime;
     36   struct sem * sem_base;
     37   struct sem_queue * sem_pending;
     38   struct sem_queue * * sem_pending_last;
     39   struct sem_undo * undo;
     40   unsigned short sem_nsems;
     41 };
     42 #include <asm/sembuf.h>
     43 struct sembuf {
     44   unsigned short sem_num;
     45   short sem_op;
     46   short sem_flg;
     47 };
     48 union __kernel_legacy_semun {
     49   int val;
     50   struct __kernel_legacy_semid_ds __user * buf;
     51   unsigned short __user * array;
     52   struct seminfo __user * __buf;
     53   void __user * __pad;
     54 };
     55 struct seminfo {
     56   int semmap;
     57   int semmni;
     58   int semmns;
     59   int semmnu;
     60   int semmsl;
     61   int semopm;
     62   int semume;
     63   int semusz;
     64   int semvmx;
     65   int semaem;
     66 };
     67 #define SEMMNI 32000
     68 #define SEMMSL 32000
     69 #define SEMMNS (SEMMNI * SEMMSL)
     70 #define SEMOPM 500
     71 #define SEMVMX 32767
     72 #define SEMAEM SEMVMX
     73 #define SEMUME SEMOPM
     74 #define SEMMNU SEMMNS
     75 #define SEMMAP SEMMNS
     76 #define SEMUSZ 20
     77 #endif
     78