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