1570af302Sopenharmony_ci#include <sys/sem.h> 2570af302Sopenharmony_ci#define T(t) (t*)0; 3570af302Sopenharmony_ci#define F(t,n) {t *y = &x.n;} 4570af302Sopenharmony_ci#define C(n) switch(n){case n:;} 5570af302Sopenharmony_cistatic void f() 6570af302Sopenharmony_ci{ 7570af302Sopenharmony_ciT(pid_t) 8570af302Sopenharmony_ciT(size_t) 9570af302Sopenharmony_ciT(time_t) 10570af302Sopenharmony_ciC(SEM_UNDO) 11570af302Sopenharmony_ciC(GETNCNT) 12570af302Sopenharmony_ciC(GETPID) 13570af302Sopenharmony_ciC(GETVAL) 14570af302Sopenharmony_ciC(GETALL) 15570af302Sopenharmony_ciC(GETZCNT) 16570af302Sopenharmony_ciC(SETVAL) 17570af302Sopenharmony_ciC(SETALL) 18570af302Sopenharmony_ci{ 19570af302Sopenharmony_cistruct semid_ds x; 20570af302Sopenharmony_ciF(struct ipc_perm,sem_perm) 21570af302Sopenharmony_ciF(unsigned short, sem_nsems) 22570af302Sopenharmony_ciF(time_t, sem_otime) 23570af302Sopenharmony_ciF(time_t, sem_ctime) 24570af302Sopenharmony_ci} 25570af302Sopenharmony_ci{ 26570af302Sopenharmony_cistruct sembuf x; 27570af302Sopenharmony_ciF(unsigned short,sem_num) 28570af302Sopenharmony_ciF(short, sem_op) 29570af302Sopenharmony_ciF(short, sem_flg) 30570af302Sopenharmony_ci} 31570af302Sopenharmony_ci{int(*p)(int,int,int,...) = semctl;} 32570af302Sopenharmony_ci{int(*p)(key_t,int,int) = semget;} 33570af302Sopenharmony_ci{int(*p)(int,struct sembuf*,size_t) = semop;} 34570af302Sopenharmony_ci 35570af302Sopenharmony_ciT(uid_t) 36570af302Sopenharmony_ciT(gid_t) 37570af302Sopenharmony_ciT(mode_t) 38570af302Sopenharmony_ciT(key_t) 39570af302Sopenharmony_ci{ 40570af302Sopenharmony_cistruct ipc_perm x; 41570af302Sopenharmony_ciF(uid_t,uid) 42570af302Sopenharmony_ciF(gid_t,gid) 43570af302Sopenharmony_ciF(uid_t,cuid) 44570af302Sopenharmony_ciF(gid_t,cgid) 45570af302Sopenharmony_ciF(mode_t, mode) 46570af302Sopenharmony_ci} 47570af302Sopenharmony_ciC(IPC_CREAT) 48570af302Sopenharmony_ciC(IPC_EXCL) 49570af302Sopenharmony_ciC(IPC_NOWAIT) 50570af302Sopenharmony_ciC(IPC_PRIVATE) 51570af302Sopenharmony_ciC(IPC_RMID) 52570af302Sopenharmony_ciC(IPC_SET) 53570af302Sopenharmony_ciC(IPC_STAT) 54570af302Sopenharmony_ci{key_t(*p)(const char*,int) = ftok;} 55570af302Sopenharmony_ci} 56