Blame src/api/sys_sem.c

nsz f81126
#include <sys/sem.h>
nsz f81126
#define T(t) (t*)0;
nsz f81126
#define F(t,n) {t *y = &x.;;}
nsz f81126
#define C(n) switch(n){case n:;}
nsz f81126
static void f()
nsz f81126
{
nsz f81126
T(pid_t)
nsz f81126
T(size_t)
nsz f81126
T(time_t)
nsz f81126
C(SEM_UNDO)
nsz f81126
C(GETNCNT)
nsz f81126
C(GETPID)
nsz f81126
C(GETVAL)
nsz f81126
C(GETALL)
nsz f81126
C(GETZCNT)
nsz f81126
C(SETVAL)
nsz f81126
C(SETALL)
nsz f81126
{
nsz f81126
struct semid_ds x;
nsz f81126
F(struct ipc_perm,sem_perm)
nsz f81126
F(unsigned short, sem_nsems)
nsz f81126
F(time_t, sem_otime)
nsz f81126
F(time_t, sem_ctime)
nsz f81126
}
nsz f81126
{
nsz f81126
struct sembuf x;
nsz f81126
F(unsigned short,sem_num)
nsz f81126
F(short, sem_op)
nsz f81126
F(short, sem_flg)
nsz f81126
}
nsz 0ef264
{int(*p)(int,int,int,...) = semctl;}
nsz 0ef264
{int(*p)(key_t,int,int) = semget;}
nsz 0ef264
{int(*p)(int,struct sembuf*,size_t) = semop;}
nsz f81126
nsz f81126
T(uid_t)
nsz f81126
T(gid_t)
nsz f81126
T(mode_t)
nsz f81126
T(key_t)
nsz f81126
{
nsz f81126
struct ipc_perm x;
nsz f81126
F(uid_t,uid)
nsz f81126
F(gid_t,gid)
nsz f81126
F(uid_t,cuid)
nsz f81126
F(gid_t,cgid)
nsz f81126
F(mode_t, mode)
nsz f81126
}
nsz f81126
C(IPC_CREAT)
nsz f81126
C(IPC_EXCL)
nsz f81126
C(IPC_NOWAIT)
nsz f81126
C(IPC_PRIVATE)
nsz f81126
C(IPC_RMID)
nsz f81126
C(IPC_SET)
nsz f81126
C(IPC_STAT)
nsz 0ef264
{key_t(*p)(const char*,int) = ftok;}
nsz f81126
}