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 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24 #define GETPID 11
     25 #define GETVAL 12
     26 #define GETALL 13
     27 #define GETNCNT 14
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29 #define GETZCNT 15
     30 #define SETVAL 16
     31 #define SETALL 17
     32 #define SEM_STAT 18
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34 #define SEM_INFO 19
     35 struct semid_ds {
     36  struct ipc_perm sem_perm;
     37  __kernel_time_t sem_otime;
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39  __kernel_time_t sem_ctime;
     40  struct sem *sem_base;
     41  struct sem_queue *sem_pending;
     42  struct sem_queue **sem_pending_last;
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44  struct sem_undo *undo;
     45  unsigned short sem_nsems;
     46 };
     47 #include <asm/sembuf.h>
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49 struct sembuf {
     50  unsigned short sem_num;
     51  short sem_op;
     52  short sem_flg;
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54 };
     55 union semun {
     56  int val;
     57  struct semid_ds __user *buf;
     58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     59  unsigned short __user *array;
     60  struct seminfo __user *__buf;
     61  void __user *__pad;
     62 };
     63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     64 struct seminfo {
     65  int semmap;
     66  int semmni;
     67  int semmns;
     68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     69  int semmnu;
     70  int semmsl;
     71  int semopm;
     72  int semume;
     73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     74  int semusz;
     75  int semvmx;
     76  int semaem;
     77 };
     78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     79 #define SEMMNI 128
     80 #define SEMMSL 250
     81 #define SEMMNS (SEMMNI*SEMMSL)
     82 #define SEMOPM 32
     83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     84 #define SEMVMX 32767
     85 #define SEMAEM SEMVMX
     86 #define SEMUME SEMOPM
     87 #define SEMMNU SEMMNS
     88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     89 #define SEMMAP SEMMNS
     90 #define SEMUSZ 20
     91 #endif
     92