/* Message queue control operation. */ int msgctl(int msqid, int cmd, struct msqid_ds *buf) { #ifdef __NR_msgctl return __libc_msgctl(msqid, cmd | __IPC_64, buf); #else return __syscall_ipc(IPCOP_msgctl, msqid, cmd | __IPC_64, 0, buf, 0); #endif }
int shmctl(int shmid, int cmd, struct shmid_ds *buf) { #ifdef __NR_shmctl return __syscall_shmctl(shmid, cmd | __IPC_64, buf); #else return __syscall_ipc(IPCOP_shmctl, shmid, cmd | __IPC_64, 0, buf, 0); #endif }
void * shmat (int shmid, const void *shmaddr, int shmflg) { int retval; unsigned long raddr; retval = __syscall_ipc(IPCOP_shmat, shmid, shmflg, (int) &raddr, (void *) shmaddr, 0); return ((unsigned long int) retval > -(unsigned long int) SHMLBA ? (void *) retval : (void *) raddr); }
/* Get messages queue. */ int msgget (key_t key, int msgflg) { return __syscall_ipc(IPCOP_msgget ,key ,msgflg ,0 ,0, 0); }
int shmget (key_t key, size_t size, int shmflg) { return __syscall_ipc(IPCOP_shmget, key, size, shmflg, NULL, 0); }
int shmdt (const void *shmaddr) { return __syscall_ipc(IPCOP_shmdt, 0, 0, 0, (void *) shmaddr, 0); }