#include <linux/ipc.h> /* Definition of needed constants */
#include <sys/syscall.h> /* Definition of SYS_* constants */
#include <unistd.h>
int syscall(SYS_ipc, unsigned int call, int first,
unsigned long second, unsigned long third, void *ptr,
long fifth); Note: glibc provides no wrapper for ipc(), necessitating the use of syscall(2)EN.
ipc()는 메세지 큐, 세마포어, 공유 메모리 등 시스템 V IPC 호출을 위한 커널 엔트리 포인터이다. call는 호출될 IPC 함수를 결정한다: 다른 인자는 적당한 호출값으로 설정된다.
사용자 프로그램은 일반적으로 알려져 있는 이름에 의해 적절한 함수를 호출해야 한다. 표준 라이브러리 개발자나 커널 해커만이 ipc()에 관하여 알 필요가 있다.
ipc()는 리눅스에 의존적이므로, 호환성을 염두에 둔 프로그램에서 사용해서는 안된다.
On some architectures—for example x86-64 and ARM—there is no ipc() system call; instead, msgctl(2)EN, semctl(2)EN, shmctl(2)EN, and so on really are implemented as separate system calls.
msgctl(2)EN, msgget(2)EN, msgrcv(2)EN, msgsnd(2)EN, semctl(2)EN, semget(2)EN, semop(2)EN, semtimedop(2)EN, shmat(2)EN, shmctl(2)EN, shmdt(2)EN, shmget(2)EN, sysvipc(7)EN