aboutsummaryrefslogtreecommitdiffstats
path: root/man2/ipc.2
blob: f36d0ffe5cb2687fa757cee5f1f29d36f1449e56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
.\" Copyright (c) 1995 Michael Chastain (mec@shell.portal.com), 15 April 1995.
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
.TH IPC 2 2021-03-22 "Linux" "Linux Programmer's Manual"
.SH NAME
ipc \- System V IPC system calls
.SH LIBRARY
Standard C library
.RI ( libc ", " \-lc )
.SH SYNOPSIS
.nf
.BR "#include <linux/ipc.h>" "        /* Definition of needed constants */"
.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
.B #include <unistd.h>
.PP
.BI "int syscall(SYS_ipc, unsigned int " call ", int " first ,
.BI "            unsigned long " second ", unsigned long " third \
", void *" ptr ,
.BI "            long " fifth );
.fi
.PP
.IR Note :
glibc provides no wrapper for
.BR ipc (),
necessitating the use of
.BR syscall (2).
.SH DESCRIPTION
.BR ipc ()
is a common kernel entry point for the System\ V IPC calls
for messages, semaphores, and shared memory.
.I call
determines which IPC function to invoke;
the other arguments are passed through to the appropriate call.
.PP
User-space programs should call the appropriate functions by their usual names.
Only standard library implementors and kernel hackers need to know about
.BR ipc ().
.SH STANDARDS
.BR ipc ()
is Linux-specific, and should not be used in programs
intended to be portable.
.SH NOTES
On some architectures\(emfor example x86-64 and ARM\(emthere is no
.BR ipc ()
system call; instead,
.BR msgctl (2),
.BR semctl (2),
.BR shmctl (2),
and so on really are implemented as separate system calls.
.SH SEE ALSO
.BR msgctl (2),
.BR msgget (2),
.BR msgrcv (2),
.BR msgsnd (2),
.BR semctl (2),
.BR semget (2),
.BR semop (2),
.BR semtimedop (2),
.BR shmat (2),
.BR shmctl (2),
.BR shmdt (2),
.BR shmget (2),
.BR sysvipc (7)