1 2 3 4 5 6 7 8 9 10 11 12
#include <sys/shm.h> #include "syscall.h" #include "ipc.h" int shmdt(const void *addr) { #ifdef __NR_shmdt return syscall1(__NR_shmdt, (long)addr); #else return syscall2(__NR_ipc, IPCOP_shmdt, (long)addr); #endif }