Blame src/api/sys_shm.c

nsz f81126
#include <sys/shm.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(shmatt_t)
nsz f81126
T(pid_t)
nsz f81126
T(size_t)
nsz f81126
T(time_t)
nsz f81126
C(SHM_RDONLY)
nsz f81126
C(SHM_RND)
nsz f81126
C(SHMLBA)
nsz f81126
{
nsz f81126
struct shmid_ds x;
nsz f81126
F(struct ipc_perm, shm_perm)
nsz f81126
F(size_t,shm_segsz)
nsz f81126
F(pid_t, shm_lpid)
nsz f81126
F(pid_t, shm_cpid)
nsz f81126
F(shmatt_t,shm_nattch)
nsz f81126
F(time_t,shm_atime)
nsz f81126
F(time_t,shm_dtime)
nsz f81126
F(time_t,shm_ctime)
nsz f81126
}
nsz 0ef264
{void*(*p)(int,const void*,int) = shmat;}
nsz 0ef264
{int(*p)(int,int,struct shmid_ds*) = shmctl;}
nsz 0ef264
{int(*p)(const void*) = shmdt;}
nsz 0ef264
{int(*p)(key_t,size_t,int) = shmget;}
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
}