]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man2/syscalls.2
syscalls.2: srcfix
[thirdparty/man-pages.git] / man2 / syscalls.2
CommitLineData
a1eaacb1 1'\" t
c11b1abf 2.\" Copyright (C) 2007 Michael Kerrisk <mtk.manpages@gmail.com>
09de4bf1
MK
3.\" with some input from Stepan Kasal <kasal@ucw.cz>
4.\"
5.\" Some content retained from an earlier version of this page:
fea681da
MK
6.\" Copyright (C) 1998 Andries Brouwer (aeb@cwi.nl)
7.\" Modifications for 2.2 and 2.4 Copyright (C) 2002 Ian Redfern
8.\" <redferni@logica.com>
9.\"
5fbde956 10.\" SPDX-License-Identifier: Linux-man-pages-copyleft
fea681da 11.\"
4c1c5274 12.TH syscalls 2 (date) "Linux man-pages (unreleased)"
fea681da 13.SH NAME
09de4bf1 14syscalls \- Linux system calls
fea681da 15.SH SYNOPSIS
c7db92b9 16.nf
09de4bf1 17Linux system calls.
c7db92b9 18.fi
fea681da
MK
19.SH DESCRIPTION
20The system call is the fundamental interface between an application
c13182ef 21and the Linux kernel.
7d50a840
MK
22.SS System calls and library wrapper functions
23System calls are generally not invoked directly,
61d7d93c
MK
24but rather via wrapper functions in glibc (or perhaps some other library).
25For details of direct invocation of a system call, see
26.BR intro (2).
7d50a840
MK
27Often, but not always, the name of the wrapper function is the same
28as the name of the system call that it invokes.
29For example, glibc contains a function
d82f9311
ES
30.BR chdir ()
31which invokes the underlying "chdir" system call.
c6d039a3 32.P
7d50a840 33Often the glibc wrapper function is quite thin, doing little work
c8bd05f9
MK
34other than copying arguments to the right registers
35before invoking the system call,
36and then setting
37.I errno
38appropriately after the system call has returned.
39(These are the same steps that are performed by
40.BR syscall (2),
41which can be used to invoke system calls
42for which no wrapper function is provided.)
43Note: system calls indicate a failure by returning a negative error
78319089
ES
44number to the caller on architectures without a separate error register/flag,
45as noted in
46.BR syscall (2);
c8bd05f9
MK
47when this happens,
48the wrapper function negates the returned error number
49(to make it positive), copies it to
50.IR errno ,
51and returns \-1 to the caller of the wrapper.
c6d039a3 52.P
7d50a840
MK
53Sometimes, however, the wrapper function does some extra work
54before invoking the system call.
55For example, nowadays there are (for reasons described below) two
56related system calls,
57.BR truncate (2)
58and
59.BR truncate64 (2),
60and the glibc
61.BR truncate ()
61d7d93c
MK
62wrapper function checks which of those system calls
63are provided by the kernel and determines which should be employed.
7d50a840 64.SS System call list
1ce7088e 65Below is a list of the Linux system calls.
09de4bf1
MK
66In the list, the
67.I Kernel
68column indicates the kernel version
69for those system calls that were new in Linux 2.2,
70or have appeared since that kernel version.
71Note the following points:
cdede5cd 72.IP \[bu] 3
09de4bf1 73Where no kernel version is indicated,
b324e17d 74the system call appeared in Linux 1.0 or earlier.
cdede5cd 75.IP \[bu]
dc2f5549 76Where a system call is marked "1.2"
b324e17d 77this means the system call probably appeared in a Linux 1.1.x kernel version,
dc2f5549 78and first appeared in a stable kernel with 1.2.
43fa7ba5
AC
79(Development of the Linux 1.2 kernel was initiated from a branch of
80Linux 1.0.6 via the Linux 1.1.x unstable kernel series.)
cdede5cd 81.IP \[bu]
dc2f5549 82Where a system call is marked "2.0"
b324e17d
AC
83this means the system call probably appeared in a Linux 1.3.x kernel version,
84and first appeared in a stable kernel with Linux 2.0.
85(Development of the Linux 2.0 kernel was initiated from a branch of
86Linux 1.2.x, somewhere around Linux 1.2.10,
87via the Linux 1.3.x unstable kernel series.)
88.\" Was Linux 2.0 started from a branch of Linux 1.2.10?
d6ce4960 89.\" At least from the timestamps of the tarballs of
b324e17d 90.\" of Linux 1.2.10 and Linux 1.3.0, that's how it looks, but in
e0bf9127 91.\" fact the diff doesn't seem very clear, the
b324e17d
AC
92.\" Linux 1.3.0 .tar.bz is much bigger (2.0 MB) than the
93.\" Linux 1.2.10 .tar.bz2 (1.8 MB), and AEB points out the
94.\" timestamps of some files in Linux 1.3.0 seem to be older
95.\" than those in Linux 1.2.10. All of this suggests
d6ce4960 96.\" that there might not have been a clean branch point.
cdede5cd 97.IP \[bu]
09de4bf1 98Where a system call is marked "2.2"
b324e17d
AC
99this means the system call probably appeared in a Linux 2.1.x kernel version,
100and first appeared in a stable kernel with Linux 2.2.0.
43fa7ba5 101(Development of the Linux 2.2 kernel was initiated from a branch of
b324e17d 102Linux 2.0.21 via the Linux 2.1.x unstable kernel series.)
cdede5cd 103.IP \[bu]
09de4bf1 104Where a system call is marked "2.4"
b324e17d
AC
105this means the system call probably appeared in a Linux 2.3.x kernel version,
106and first appeared in a stable kernel with Linux 2.4.0.
107(Development of the Linux 2.4 kernel was initiated from a branch of
108Linux 2.2.8 via the Linux 2.3.x unstable kernel series.)
cdede5cd 109.IP \[bu]
09de4bf1 110Where a system call is marked "2.6"
b324e17d
AC
111this means the system call probably appeared in a Linux 2.5.x kernel version,
112and first appeared in a stable kernel with Linux 2.6.0.
113(Development of Linux 2.6 was initiated from a branch
114of Linux 2.4.15 via the Linux 2.5.x unstable kernel series.)
cdede5cd 115.IP \[bu]
b324e17d
AC
116Starting with Linux 2.6.0, the development model changed,
117and new system calls may appear in each Linux 2.6.x release.
f9e4d811
MK
118In this case, the exact version number where the system call appeared
119is shown.
b324e17d
AC
120This convention continues with the Linux 3.x kernel series,
121which followed on from Linux 2.6.39; and the Linux 4.x kernel series,
122which followed on from Linux 3.19; and the Linux 5.x kernel series,
1b65d56c
AC
123which followed on from Linux 4.20; and the Linux 6.x kernel series,
124which followed on from Linux 5.19.
cdede5cd 125.IP \[bu]
f9e4d811
MK
126In some cases, a system call was added to a stable kernel
127series after it branched from the previous stable kernel
128series, and then backported into the earlier stable kernel series.
b324e17d
AC
129For example some system calls that appeared in Linux 2.6.x were also backported
130into a Linux 2.4.x release after Linux 2.4.15.
f9e4d811 131When this is so, the version where the system call appeared
09de4bf1 132in both of the major kernel series is listed.
c6d039a3 133.P
b324e17d 134The list of system calls that are available as at Linux 5.14
09de4bf1 135(or in a few cases only on older kernels) is as follows:
24347d22 136.P
09de4bf1
MK
137.\"
138.\" Looking at scripts/checksyscalls.sh in the kernel source is
929f1ff7 139.\" instructive about x86 specifics.
09de4bf1
MK
140.\"
141.TS
24347d22
BR
142Lb Lb Lb
143L2 L L.
144System call Kernel Notes
145_
dc2f5549 146\fB_llseek\fP(2) 1.2
8717e79e 147\fB_newselect\fP(2) 2.0
f1004656 148\fB_sysctl\fP(2) 2.0 Removed in 5.5
30e3e116
MK
149\fBaccept\fP(2) 2.0 T{
150See notes on \fBsocketcall\fP(2)
151T}
53e819d0 152\fBaccept4\fP(2) 2.6.28
8717e79e
MK
153\fBaccess\fP(2) 1.0
154\fBacct\fP(2) 1.0
5685b18c 155\fBadd_key\fP(2) 2.6.10
8717e79e
MK
156\fBadjtimex\fP(2) 1.0
157\fBalarm\fP(2) 1.0
f9e4d811 158\fBalloc_hugepages\fP(2) 2.5.36 Removed in 2.5.44
e07c81fe
ES
159.\" 4adeefe161a74369e44cc8e663f240ece0470dc3
160\fBarc_gettls\fP(2) 3.9 ARC only
161\fBarc_settls\fP(2) 3.9 ARC only
162.\" 91e040a79df73d371f70792f30380d4e44805250
59a4d9b3 163\fBarc_usr_cmpxchg\fP(2) 4.9 ARC only
e07c81fe 164.\" x86: 79170fda313ed5be2394f87aa2a00d597f8ed4a1
30e3e116
MK
165\fBarch_prctl\fP(2) 2.6 T{
166x86_64, x86 since 4.12
167T}
e07c81fe
ES
168.\" 9674cdc74d63f346870943ef966a034f8c71ee57
169\fBatomic_barrier\fP(2) 2.6.34 m68k only
170\fBatomic_cmpxchg_32\fP(2) 2.6.34 m68k only
8717e79e 171\fBbdflush\fP(2) 1.2 T{
b6bc918e 172Deprecated (does nothing)
b6bc918e 173since 2.6
56f2caff 174T}
30e3e116
MK
175\fBbind\fP(2) 2.0 T{
176See notes on \fBsocketcall\fP(2)
177T}
a3708b57 178\fBbpf\fP(2) 3.18
8717e79e 179\fBbrk\fP(2) 1.0
e07c81fe
ES
180\fBbreakpoint\fP(2) 2.2 T{
181ARM OABI only, defined with
182\fB__ARM_NR\fP prefix
183T}
929f1ff7 184\fBcacheflush\fP(2) 1.2 Not on x86
09de4bf1
MK
185\fBcapget\fP(2) 2.2
186\fBcapset\fP(2) 2.2
8717e79e
MK
187\fBchdir\fP(2) 1.0
188\fBchmod\fP(2) 1.0
189\fBchown\fP(2) 2.2 T{
b6bc918e 190See \fBchown\fP(2) for
b6bc918e 191version details
8717e79e 192T}
09de4bf1 193\fBchown32\fP(2) 2.4
8717e79e 194\fBchroot\fP(2) 1.0
b9cad55b 195\fBclock_adjtime\fP(2) 2.6.39
09de4bf1
MK
196\fBclock_getres\fP(2) 2.6
197\fBclock_gettime\fP(2) 2.6
198\fBclock_nanosleep\fP(2) 2.6
199\fBclock_settime\fP(2) 2.6
e07c81fe 200\fBclone2\fP(2) 2.4 IA-64 only
8717e79e 201\fBclone\fP(2) 1.0
7fd5cf65 202\fBclone3\fP(2) 5.3
8717e79e 203\fBclose\fP(2) 1.0
373bd6e2 204\fBclose_range\fP(2) 5.9
e07c81fe
ES
205.\" .\" dcef1f634657dabe7905af3ccda12cf7f0b6fcc1
206.\" .\" cc20d42986d5807cbe4f5c7c8e3dab2e59ea0db3
207.\" .\" db695c0509d6ec9046ee5e4c520a19fa17d9fce2
208.\" \fBcmpxchg\fP(2) 2.6.12 T{
209.\" ARM, syscall constant never was
ba2c4752 210.\" exposed to user space, in-kernel
e07c81fe 211.\" definition had \fB__ARM_NR\fP prefix,
e07c81fe
ES
212.\" removed in 4.4
213.\" T}
214.\" 867e359b97c970a60626d5d76bbe2a8fadbf38fb
215.\" bb9d812643d8a121df7d614a2b9c60193a92deb0
30e3e116
MK
216\fBconnect\fP(2) 2.0 T{
217See notes on \fBsocketcall\fP(2)
218T}
a5918afa 219\fBcopy_file_range\fP(2) 4.5
8717e79e 220\fBcreat\fP(2) 1.0
a0bd8202 221\fBcreate_module\fP(2) 1.0 Removed in 2.6
8717e79e 222\fBdelete_module\fP(2) 1.0
e07c81fe
ES
223.\" 1394f03221790a988afc3e4b3cb79f2e477246a9
224.\" 4ba66a9760722ccbb691b8f7116cad2f791cca7b
8717e79e
MK
225\fBdup\fP(2) 1.0
226\fBdup2\fP(2) 1.0
eb153420 227\fBdup3\fP(2) 2.6.27
09de4bf1 228\fBepoll_create\fP(2) 2.6
eb153420 229\fBepoll_create1\fP(2) 2.6.27
09de4bf1
MK
230\fBepoll_ctl\fP(2) 2.6
231\fBepoll_pwait\fP(2) 2.6.19
3c881315 232\fBepoll_pwait2\fP(2) 5.11
09de4bf1
MK
233\fBepoll_wait\fP(2) 2.6
234\fBeventfd\fP(2) 2.6.22
eb153420 235\fBeventfd2\fP(2) 2.6.27
e07c81fe 236\fBexecv\fP(2) 2.0 T{
d0a395a2 237SPARC/SPARC64 only, for
69b5b8df 238compatibility with SunOS
e07c81fe 239T}
8717e79e 240\fBexecve\fP(2) 1.0
7c244c53 241\fBexecveat\fP(2) 3.19
8717e79e 242\fBexit\fP(2) 1.0
30fa088c 243\fBexit_group\fP(2) 2.6
09de4bf1 244\fBfaccessat\fP(2) 2.6.16
00714623 245\fBfaccessat2\fP(2) 5.8
7d50a840
MK
246\fBfadvise64\fP(2) 2.6
247.\" Implements \fBposix_fadvise\fP(2)
248\fBfadvise64_64\fP(2) 2.6
6397da8c 249\fBfallocate\fP(2) 2.6.23
3610ae93
MK
250\fBfanotify_init\fP(2) 2.6.37
251\fBfanotify_mark\fP(2) 2.6.37
252.\" The fanotify calls were added in Linux 2.6.36,
253.\" but disabled while the API was finalized.
8717e79e
MK
254\fBfchdir\fP(2) 1.0
255\fBfchmod\fP(2) 1.0
09de4bf1 256\fBfchmodat\fP(2) 2.6.16
8717e79e 257\fBfchown\fP(2) 1.0
09de4bf1
MK
258\fBfchown32\fP(2) 2.4
259\fBfchownat\fP(2) 2.6.16
8717e79e 260\fBfcntl\fP(2) 1.0
09de4bf1 261\fBfcntl64\fP(2) 2.4
8717e79e 262\fBfdatasync\fP(2) 2.0
09de4bf1 263\fBfgetxattr\fP(2) 2.6; 2.4.18
ecbb4bb7 264\fBfinit_module\fP(2) 3.8
09de4bf1 265\fBflistxattr\fP(2) 2.6; 2.4.18
dc2f5549 266\fBflock\fP(2) 2.0
8717e79e 267\fBfork\fP(2) 1.0
f9e4d811 268\fBfree_hugepages\fP(2) 2.5.36 Removed in 2.5.44
09de4bf1 269\fBfremovexattr\fP(2) 2.6; 2.4.18
519f86ca 270\fBfsconfig\fP(2) 5.2
09de4bf1 271\fBfsetxattr\fP(2) 2.6; 2.4.18
519f86ca
MK
272\fBfsmount\fP(2) 5.2
273\fBfsopen\fP(2) 5.2
274\fBfspick\fP(2) 5.2
8717e79e 275\fBfstat\fP(2) 1.0
09de4bf1 276\fBfstat64\fP(2) 2.4
f6b8bc07 277\fBfstatat64\fP(2) 2.6.16
8717e79e 278\fBfstatfs\fP(2) 1.0
09de4bf1 279\fBfstatfs64\fP(2) 2.6
aeddd876 280\fBfsync\fP(2) 1.0
8717e79e 281\fBftruncate\fP(2) 1.0
09de4bf1 282\fBftruncate64\fP(2) 2.4
30fa088c 283\fBfutex\fP(2) 2.6
09de4bf1 284\fBfutimesat\fP(2) 2.6.16
4c68ac9e 285\fBget_kernel_syms\fP(2) 1.0 Removed in 2.6
09de4bf1
MK
286\fBget_mempolicy\fP(2) 2.6.6
287\fBget_robust_list\fP(2) 2.6.17
30fa088c 288\fBget_thread_area\fP(2) 2.6
e07c81fe 289.\" 8fcd6c45f5a65621ec809b7866a3623e9a01d4ed
d0a395a2
MK
290\fBget_tls\fP(2) 4.15 T{
291ARM OABI only, has
d0a395a2
MK
292\fB__ARM_NR\fP prefix
293T}
09de4bf1
MK
294\fBgetcpu\fP(2) 2.6.19
295\fBgetcwd\fP(2) 2.2
dc2f5549 296\fBgetdents\fP(2) 2.0
09de4bf1 297\fBgetdents64\fP(2) 2.4
e07c81fe
ES
298.\" parisc: 863722e856e64dae0e252b6bb546737c6c5626ce
299\fBgetdomainname\fP(2) 2.2 T{
300SPARC, SPARC64; available
e07c81fe 301as \fBosf_getdomainname\fP(2)
e07c81fe
ES
302on Alpha since Linux 2.0
303T}
d0a395a2 304.\" ec98c6b9b47df6df1c1fa6cf3d427414f8c2cf16
e07c81fe
ES
305\fBgetdtablesize\fP(2) 2.0 T{
306SPARC (removed in 2.6.26),
ea09dfe6 307available on Alpha as
d0a395a2 308\fBosf_getdtablesize\fP(2)
e07c81fe 309T}
8717e79e 310\fBgetegid\fP(2) 1.0
09de4bf1 311\fBgetegid32\fP(2) 2.4
8717e79e 312\fBgeteuid\fP(2) 1.0
09de4bf1 313\fBgeteuid32\fP(2) 2.4
8717e79e 314\fBgetgid\fP(2) 1.0
09de4bf1 315\fBgetgid32\fP(2) 2.4
8717e79e 316\fBgetgroups\fP(2) 1.0
09de4bf1 317\fBgetgroups32\fP(2) 2.4
e07c81fe 318.\" SPARC removal: ec98c6b9b47df6df1c1fa6cf3d427414f8c2cf16
d0a395a2
MK
319\fBgethostname\fP(2) 2.0 T{
320Alpha, was available on
d0a395a2
MK
321SPARC up to Linux 2.6.26
322T}
8717e79e 323\fBgetitimer\fP(2) 1.0
30e3e116
MK
324\fBgetpeername\fP(2) 2.0 T{
325See notes on \fBsocketcall\fP(2)
326T}
c1e10426
EH
327\fBgetpagesize\fP(2) 2.0 T{
328Alpha, SPARC/SPARC64 only
329T}
8717e79e
MK
330\fBgetpgid\fP(2) 1.0
331\fBgetpgrp\fP(2) 1.0
332\fBgetpid\fP(2) 1.0
333\fBgetppid\fP(2) 1.0
334\fBgetpriority\fP(2) 1.0
1d94912f 335\fBgetrandom\fP(2) 3.17
09de4bf1
MK
336\fBgetresgid\fP(2) 2.2
337\fBgetresgid32\fP(2) 2.4
338\fBgetresuid\fP(2) 2.2
339\fBgetresuid32\fP(2) 2.4
8717e79e
MK
340\fBgetrlimit\fP(2) 1.0
341\fBgetrusage\fP(2) 1.0
dc2f5549 342\fBgetsid\fP(2) 2.0
30e3e116
MK
343\fBgetsockname\fP(2) 2.0 T{
344See notes on \fBsocketcall\fP(2)
345T}
346\fBgetsockopt\fP(2) 2.0 T{
347See notes on \fBsocketcall\fP(2)
348T}
09de4bf1 349\fBgettid\fP(2) 2.4.11
8717e79e
MK
350\fBgettimeofday\fP(2) 1.0
351\fBgetuid\fP(2) 1.0
09de4bf1 352\fBgetuid32\fP(2) 2.4
30e3e116
MK
353\fBgetunwind\fP(2) 2.4.8 T{
354IA-64 only; deprecated
355T}
09de4bf1 356\fBgetxattr\fP(2) 2.6; 2.4.18
30e3e116
MK
357\fBgetxgid\fP(2) 2.0 T{
358Alpha only; see NOTES
359T}
360\fBgetxpid\fP(2) 2.0 T{
361Alpha only; see NOTES
362T}
363\fBgetxuid\fP(2) 2.0 T{
364Alpha only; see NOTES
365T}
8717e79e 366\fBinit_module\fP(2) 1.0
09de4bf1
MK
367\fBinotify_add_watch\fP(2) 2.6.13
368\fBinotify_init\fP(2) 2.6.13
eb153420 369\fBinotify_init1\fP(2) 2.6.27
09de4bf1 370\fBinotify_rm_watch\fP(2) 2.6.13
30fa088c
MK
371\fBio_cancel\fP(2) 2.6
372\fBio_destroy\fP(2) 2.6
373\fBio_getevents\fP(2) 2.6
6a1634dc 374\fBio_pgetevents\fP(2) 4.18
30fa088c
MK
375\fBio_setup\fP(2) 2.6
376\fBio_submit\fP(2) 2.6
6d2c81ea
MK
377\fBio_uring_enter\fP(2) 5.1
378\fBio_uring_register\fP(2) 5.1
379\fBio_uring_setup\fP(2) 5.1
8717e79e
MK
380\fBioctl\fP(2) 1.0
381\fBioperm\fP(2) 1.0
382\fBiopl\fP(2) 1.0
09de4bf1
MK
383\fBioprio_get\fP(2) 2.6.13
384\fBioprio_set\fP(2) 2.6.13
8717e79e 385\fBipc\fP(2) 1.0
7d50a840 386.\" Implements System V IPC calls
8eec4a23 387\fBkcmp\fP(2) 3.5
e07c81fe 388\fBkern_features\fP(2) 3.7 SPARC64 only
bea08fec 389.\" FIXME . document kern_features():
38291c52 390.\" commit 517ffce4e1a03aea979fe3a18a3dd1761a24fafb
1d94912f 391\fBkexec_file_load\fP(2) 3.17
3ed3a507
MK
392\fBkexec_load\fP(2) 2.6.13
393.\" The entry in the syscall table was reserved starting in 2.6.7
7d50a840 394.\" Was named sys_kexec_load() from 2.6.7 to 2.6.16
5685b18c 395\fBkeyctl\fP(2) 2.6.10
8717e79e 396\fBkill\fP(2) 1.0
c2d505de
MK
397\fBlandlock_add_rule\fP(2) 5.13
398\fBlandlock_create_ruleset\fP(2) 5.13
399\fBlandlock_restrict_self\fP(2) 5.13
8717e79e 400\fBlchown\fP(2) 1.0 T{
b6bc918e 401See \fBchown\fP(2) for
b6bc918e 402version details
8717e79e 403T}
09de4bf1
MK
404\fBlchown32\fP(2) 2.4
405\fBlgetxattr\fP(2) 2.6; 2.4.18
8717e79e 406\fBlink\fP(2) 1.0
09de4bf1 407\fBlinkat\fP(2) 2.6.16
30e3e116
MK
408\fBlisten\fP(2) 2.0 T{
409See notes on \fBsocketcall\fP(2)
410T}
09de4bf1
MK
411\fBlistxattr\fP(2) 2.6; 2.4.18
412\fBllistxattr\fP(2) 2.6; 2.4.18
09de4bf1
MK
413\fBlookup_dcookie\fP(2) 2.6
414\fBlremovexattr\fP(2) 2.6; 2.4.18
8717e79e 415\fBlseek\fP(2) 1.0
09de4bf1 416\fBlsetxattr\fP(2) 2.6; 2.4.18
8717e79e 417\fBlstat\fP(2) 1.0
09de4bf1
MK
418\fBlstat64\fP(2) 2.4
419\fBmadvise\fP(2) 2.4
09de4bf1 420\fBmbind\fP(2) 2.6.6
e07c81fe
ES
421\fBmemory_ordering\fP(2) 2.2 SPARC64 only
422.\" 26025bbfbba33a9425be1b89eccb4664ea4c17b6
423.\" bb6fb6dfcc17cddac11ac295861f7608194447a7
7e086953 424\fBmembarrier\fP(2) 3.17
1d94912f 425\fBmemfd_create\fP(2) 3.17
fabb1a2a 426\fBmemfd_secret\fP(2) 5.14
09de4bf1
MK
427\fBmigrate_pages\fP(2) 2.6.16
428\fBmincore\fP(2) 2.4
8717e79e 429\fBmkdir\fP(2) 1.0
09de4bf1 430\fBmkdirat\fP(2) 2.6.16
8717e79e 431\fBmknod\fP(2) 1.0
09de4bf1 432\fBmknodat\fP(2) 2.6.16
8717e79e 433\fBmlock\fP(2) 2.0
73ea29aa 434\fBmlock2\fP(2) 4.4
8717e79e
MK
435\fBmlockall\fP(2) 2.0
436\fBmmap\fP(2) 1.0
09de4bf1 437\fBmmap2\fP(2) 2.4
8717e79e
MK
438\fBmodify_ldt\fP(2) 1.0
439\fBmount\fP(2) 1.0
519f86ca 440\fBmove_mount\fP(2) 5.2
09de4bf1 441\fBmove_pages\fP(2) 2.6.18
8717e79e 442\fBmprotect\fP(2) 1.0
7d50a840
MK
443\fBmq_getsetattr\fP(2) 2.6.6
444.\" Implements \fBmq_getattr\fP(3) and \fBmq_setattr\fP(3)
09de4bf1
MK
445\fBmq_notify\fP(2) 2.6.6
446\fBmq_open\fP(2) 2.6.6
447\fBmq_timedreceive\fP(2) 2.6.6
448\fBmq_timedsend\fP(2) 2.6.6
8717e79e 449\fBmq_unlink\fP(2) 2.6.6
dc2f5549 450\fBmremap\fP(2) 2.0
30e3e116
MK
451\fBmsgctl\fP(2) 2.0 T{
452See notes on \fBipc\fP(2)
453T}
454\fBmsgget\fP(2) 2.0 T{
455See notes on \fBipc\fP(2)
456T}
457\fBmsgrcv\fP(2) 2.0 T{
458See notes on \fBipc\fP(2)
459T}
460\fBmsgsnd\fP(2) 2.0 T{
461See notes on \fBipc\fP(2)
462T}
dc2f5549 463\fBmsync\fP(2) 2.0
af4c9a82
MK
464.\" \fBmultiplexer\fP(2) ?? __NR_multiplexer reserved on
465.\" PowerPC, but unimplemented?
8717e79e
MK
466\fBmunlock\fP(2) 2.0
467\fBmunlockall\fP(2) 2.0
468\fBmunmap\fP(2) 1.0
b9cad55b 469\fBname_to_handle_at\fP(2) 2.6.39
dc2f5549 470\fBnanosleep\fP(2) 2.0
e07c81fe 471.\" 5590ff0d5528b60153c0b4e7b771472b5a95e297
64cdc974
BR
472\fBnewfstatat\fP(2) 2.6.16 T{
473See \fBstat\fP(2)
474T}
18a97acf 475\fBnfsservctl\fP(2) 2.2 Removed in 3.1
8717e79e 476\fBnice\fP(2) 1.0
30e3e116
MK
477\fBold_adjtimex\fP(2) 2.0 T{
478Alpha only; see NOTES
479T}
e07c81fe 480\fBold_getrlimit\fP(2) 2.4 T{
d0a395a2 481Old variant of \fBgetrlimit\fP(2)
d0a395a2 482that used a different value
d0a395a2 483for \fBRLIM_INFINITY\fP
e07c81fe 484T}
8717e79e
MK
485\fBoldfstat\fP(2) 1.0
486\fBoldlstat\fP(2) 1.0
487\fBoldolduname\fP(2) 1.0
488\fBoldstat\fP(2) 1.0
d0a395a2
MK
489\fBoldumount\fP(2) 2.4.116 T{
490Name of the old \fBumount\fP(2)
d0a395a2
MK
491syscall on Alpha
492T}
8717e79e
MK
493\fBolduname\fP(2) 1.0
494\fBopen\fP(2) 1.0
b9cad55b 495\fBopen_by_handle_at\fP(2) 2.6.39
519f86ca 496\fBopen_tree\fP(2) 5.2
09de4bf1 497\fBopenat\fP(2) 2.6.16
2054c92a 498\fBopenat2\fP(2) 5.6
e07c81fe 499.\" 9d02a4283e9ce4e9ca11ff00615bdacdb0515a1a
30e3e116
MK
500\fBor1k_atomic\fP(2) 3.1 T{
501OpenRISC 1000 only
502T}
8717e79e 503\fBpause\fP(2) 1.0
929f1ff7
MK
504\fBpciconfig_iobase\fP(2) 2.2.15; 2.4 Not on x86
505.\" Alpha, PowerPC, ARM; not x86
506\fBpciconfig_read\fP(2) 2.0.26; 2.2 Not on x86
507.\" , PowerPC, ARM; not x86
508\fBpciconfig_write\fP(2) 2.0.26; 2.2 Not on x86
509.\" , PowerPC, ARM; not x86
56f2caff 510\fBperf_event_open\fP(2) 2.6.31 T{
dc0fac14 511Was perf_counter_open() in
dc0fac14 5122.6.31; renamed in 2.6.32
56f2caff 513T}
dc2f5549 514\fBpersonality\fP(2) 1.2
30e3e116
MK
515\fBperfctr\fP(2) 2.2 T{
516SPARC only; removed in 2.6.34
517T}
7ddff6a4 518.\" commit c7d5a0050773e98d1094eaa9f2a1a793fafac300 removed perfctr()
eb2b1b99 519\fBperfmonctl\fP(2) 2.4 IA-64 only; removed in 5.10
2054c92a 520\fBpidfd_getfd\fP(2) 5.6
6d2c81ea 521\fBpidfd_send_signal\fP(2) 5.1
7fd5cf65 522\fBpidfd_open\fP(2) 5.3
8717e79e 523\fBpipe\fP(2) 1.0
eb153420 524\fBpipe2\fP(2) 2.6.27
dc2f5549 525\fBpivot_root\fP(2) 2.4
6075e4eb
MK
526\fBpkey_alloc\fP(2) 4.8
527\fBpkey_free\fP(2) 4.8
528\fBpkey_mprotect\fP(2) 4.8
8717e79e 529\fBpoll\fP(2) 2.0.36; 2.2
09de4bf1
MK
530\fBppoll\fP(2) 2.6.16
531\fBprctl\fP(2) 2.2
56f2caff 532\fBpread64\fP(2) T{
b6bc918e 533Added as "pread" in 2.2;
b6bc918e 534renamed "pread64" in 2.6
56f2caff 535T}
0877a26b 536\fBpreadv\fP(2) 2.6.30
28520ed4 537\fBpreadv2\fP(2) 4.6
7b08c45b 538\fBprlimit64\fP(2) 2.6.36
baa72cc3 539\fBprocess_madvise\fP(2) 5.10
f06f5014
DP
540\fBprocess_vm_readv\fP(2) 3.2
541\fBprocess_vm_writev\fP(2) 3.2
7d50a840
MK
542\fBpselect6\fP(2) 2.6.16
543.\" Implements \fBpselect\fP(2)
8717e79e 544\fBptrace\fP(2) 1.0
56f2caff 545\fBpwrite64\fP(2) T{
b6bc918e 546Added as "pwrite" in 2.2;
b6bc918e 547renamed "pwrite64" in 2.6
56f2caff 548T}
0877a26b 549\fBpwritev\fP(2) 2.6.30
28520ed4 550\fBpwritev2\fP(2) 4.6
13f66890 551\fBquery_module\fP(2) 2.2 Removed in 2.6
8717e79e 552\fBquotactl\fP(2) 1.0
9f275af1 553\fBquotactl_fd\fP(2) 5.14
8717e79e 554\fBread\fP(2) 1.0
09de4bf1 555\fBreadahead\fP(2) 2.4.13
8717e79e 556\fBreaddir\fP(2) 1.0
7d50a840 557.\" Supersedes \fBgetdents\fP(2)
8717e79e 558\fBreadlink\fP(2) 1.0
09de4bf1 559\fBreadlinkat\fP(2) 2.6.16
dc2f5549 560\fBreadv\fP(2) 2.0
8717e79e 561\fBreboot\fP(2) 1.0
30e3e116
MK
562\fBrecv\fP(2) 2.0 T{
563See notes on \fBsocketcall\fP(2)
564T}
565\fBrecvfrom\fP(2) 2.0 T{
566See notes on \fBsocketcall\fP(2)
567T}
568\fBrecvmsg\fP(2) 2.0 T{
569See notes on \fBsocketcall\fP(2)
570T}
285bf67e 571\fBrecvmmsg\fP(2) 2.6.33
30e3e116
MK
572\fBremap_file_pages\fP(2) 2.6 T{
573Deprecated since 3.16
574T}
09de4bf1 575\fBremovexattr\fP(2) 2.6; 2.4.18
8717e79e 576\fBrename\fP(2) 1.0
09de4bf1 577\fBrenameat\fP(2) 2.6.16
bf253d9b 578\fBrenameat2\fP(2) 3.15
5685b18c 579\fBrequest_key\fP(2) 2.6.10
09de4bf1 580\fBrestart_syscall\fP(2) 2.6
e07c81fe
ES
581.\" 921ebd8f2c081b3cf6c3b29ef4103eef3ff26054
582\fBriscv_flush_icache\fP(2) 4.15 RISC-V only
8717e79e 583\fBrmdir\fP(2) 1.0
6a1634dc 584\fBrseq\fP(2) 4.18
09de4bf1
MK
585\fBrt_sigaction\fP(2) 2.2
586\fBrt_sigpending\fP(2) 2.2
587\fBrt_sigprocmask\fP(2) 2.2
7d50a840 588\fBrt_sigqueueinfo\fP(2) 2.2
09de4bf1
MK
589\fBrt_sigreturn\fP(2) 2.2
590\fBrt_sigsuspend\fP(2) 2.2
591\fBrt_sigtimedwait\fP(2) 2.2
285bf67e 592\fBrt_tgsigqueueinfo\fP(2) 2.6.31
30e3e116
MK
593\fBrtas\fP(2) 2.6.2 T{
594PowerPC/PowerPC64 only
595T}
993d1ce3 596\fBs390_runtime_instr\fP(2) 3.7 s390 only
80a74083
MK
597\fBs390_pci_mmio_read\fP(2) 3.19 s390 only
598\fBs390_pci_mmio_write\fP(2) 3.19 s390 only
ef741e2a 599\fBs390_sthyi\fP(2) 4.15 s390 only
605e9d07 600\fBs390_guarded_storage\fP(2) 4.12 s390 only
d0a395a2 601\fBsched_get_affinity\fP(2) 2.6 T{
64fd7f58
BR
602Name of
603.BR \%sched_getaffinity (2)
d0a395a2
MK
604on SPARC and SPARC64
605T}
dc2f5549
MK
606\fBsched_get_priority_max\fP(2) 2.0
607\fBsched_get_priority_min\fP(2) 2.0
30fa088c 608\fBsched_getaffinity\fP(2) 2.6
70415818 609\fBsched_getattr\fP(2) 3.14
dc2f5549
MK
610\fBsched_getparam\fP(2) 2.0
611\fBsched_getscheduler\fP(2) 2.0
612\fBsched_rr_get_interval\fP(2) 2.0
d0a395a2 613\fBsched_set_affinity\fP(2) 2.6 T{
64fd7f58
BR
614Name of
615.BR \%sched_setaffinity (2)
d0a395a2
MK
616on SPARC and SPARC64
617T}
30fa088c 618\fBsched_setaffinity\fP(2) 2.6
70415818 619\fBsched_setattr\fP(2) 3.14
dc2f5549
MK
620\fBsched_setparam\fP(2) 2.0
621\fBsched_setscheduler\fP(2) 2.0
622\fBsched_yield\fP(2) 2.0
1d94912f 623\fBseccomp\fP(2) 3.17
8717e79e 624\fBselect\fP(2) 1.0
30e3e116
MK
625\fBsemctl\fP(2) 2.0 T{
626See notes on \fBipc\fP(2)
627T}
628\fBsemget\fP(2) 2.0 T{
629See notes on \fBipc\fP(2)
630T}
631\fBsemop\fP(2) 2.0 T{
632See notes on \fBipc\fP(2)
633T}
09de4bf1 634\fBsemtimedop\fP(2) 2.6; 2.4.22
30e3e116
MK
635\fBsend\fP(2) 2.0 T{
636See notes on \fBsocketcall\fP(2)
637T}
09de4bf1
MK
638\fBsendfile\fP(2) 2.2
639\fBsendfile64\fP(2) 2.6; 2.4.19
3e55b0bd 640\fBsendmmsg\fP(2) 3.0
30e3e116
MK
641\fBsendmsg\fP(2) 2.0 T{
642See notes on \fBsocketcall\fP(2)
643T}
644\fBsendto\fP(2) 2.0 T{
645See notes on \fBsocketcall\fP(2)
646T}
09de4bf1
MK
647\fBset_mempolicy\fP(2) 2.6.6
648\fBset_robust_list\fP(2) 2.6.17
30fa088c 649\fBset_thread_area\fP(2) 2.6
09de4bf1 650\fBset_tid_address\fP(2) 2.6
d0a395a2
MK
651\fBset_tls\fP(2) 2.6.11 T{
652ARM OABI/EABI only (constant
d0a395a2
MK
653has \fB__ARM_NR\fP prefix)
654T}
a5819baa
MK
655.\" \fBsetaltroot\fP(2) 2.6.10 T{
656.\" Removed in 2.6.11, exposed one
657.\" of implementation details of
658.\" \fBpersonality\fP(2) (creating an
659.\" alternative root, precursor of
660.\" mount namespaces) to user space.
661.\" T}
9947a8d7
MK
662.\" See http://lkml.org/lkml/2005/8/1/83
663.\" "[PATCH] remove sys_set_zone_reclaim()"
8717e79e 664\fBsetdomainname\fP(2) 1.0
dc2f5549 665\fBsetfsgid\fP(2) 1.2
09de4bf1 666\fBsetfsgid32\fP(2) 2.4
dc2f5549 667\fBsetfsuid\fP(2) 1.2
09de4bf1 668\fBsetfsuid32\fP(2) 2.4
8717e79e 669\fBsetgid\fP(2) 1.0
09de4bf1 670\fBsetgid32\fP(2) 2.4
8717e79e 671\fBsetgroups\fP(2) 1.0
09de4bf1 672\fBsetgroups32\fP(2) 2.4
e07c81fe 673.\" arch/alpha/include/asm/core_lca.h
30e3e116
MK
674\fBsethae\fP(2) 2.0 T{
675Alpha only; see NOTES
676T}
8717e79e
MK
677\fBsethostname\fP(2) 1.0
678\fBsetitimer\fP(2) 1.0
3e55b0bd 679\fBsetns\fP(2) 3.0
8717e79e 680\fBsetpgid\fP(2) 1.0
d0a395a2 681\fBsetpgrp\fP(2) 2.0 T{
64cdc974 682Alternative name for \fBsetpgid\fP(2) on Alpha
d0a395a2 683T}
8717e79e
MK
684\fBsetpriority\fP(2) 1.0
685\fBsetregid\fP(2) 1.0
09de4bf1
MK
686\fBsetregid32\fP(2) 2.4
687\fBsetresgid\fP(2) 2.2
688\fBsetresgid32\fP(2) 2.4
689\fBsetresuid\fP(2) 2.2
690\fBsetresuid32\fP(2) 2.4
8717e79e 691\fBsetreuid\fP(2) 1.0
09de4bf1 692\fBsetreuid32\fP(2) 2.4
8717e79e
MK
693\fBsetrlimit\fP(2) 1.0
694\fBsetsid\fP(2) 1.0
30e3e116
MK
695\fBsetsockopt\fP(2) 2.0 T{
696See notes on \fBsocketcall\fP(2)
697T}
8717e79e
MK
698\fBsettimeofday\fP(2) 1.0
699\fBsetuid\fP(2) 1.0
09de4bf1 700\fBsetuid32\fP(2) 2.4
e7fa750a 701\fBsetup\fP(2) 1.0 Removed in 2.2
09de4bf1 702\fBsetxattr\fP(2) 2.6; 2.4.18
8717e79e 703\fBsgetmask\fP(2) 1.0
30e3e116
MK
704\fBshmat\fP(2) 2.0 T{
705See notes on \fBipc\fP(2)
706T}
707\fBshmctl\fP(2) 2.0 T{
708See notes on \fBipc\fP(2)
709T}
710\fBshmdt\fP(2) 2.0 T{
711See notes on \fBipc\fP(2)
712T}
713\fBshmget\fP(2) 2.0 T{
714See notes on \fBipc\fP(2)
715T}
716\fBshutdown\fP(2) 2.0 T{
717See notes on \fBsocketcall\fP(2)
718T}
8717e79e 719\fBsigaction\fP(2) 1.0
09de4bf1 720\fBsigaltstack\fP(2) 2.2
8717e79e 721\fBsignal\fP(2) 1.0
09de4bf1 722\fBsignalfd\fP(2) 2.6.22
eb153420 723\fBsignalfd4\fP(2) 2.6.27
8717e79e
MK
724\fBsigpending\fP(2) 1.0
725\fBsigprocmask\fP(2) 1.0
726\fBsigreturn\fP(2) 1.0
727\fBsigsuspend\fP(2) 1.0
30e3e116
MK
728\fBsocket\fP(2) 2.0 T{
729See notes on \fBsocketcall\fP(2)
730T}
8717e79e 731\fBsocketcall\fP(2) 1.0
7d50a840 732.\" Implements BSD socket calls
30e3e116
MK
733\fBsocketpair\fP(2) 2.0 T{
734See notes on \fBsocketcall\fP(2)
735T}
e07c81fe
ES
736.\" 5a0015d62668e64c8b6e02e360fbbea121bfd5e6
737\fBspill\fP(2) 2.6.13 Xtensa only
09de4bf1 738\fBsplice\fP(2) 2.6.17
30e3e116
MK
739\fBspu_create\fP(2) 2.6.16 T{
740PowerPC/PowerPC64 only
741T}
742\fBspu_run\fP(2) 2.6.16 T{
743PowerPC/PowerPC64 only
744T}
8717e79e
MK
745\fBssetmask\fP(2) 1.0
746\fBstat\fP(2) 1.0
09de4bf1 747\fBstat64\fP(2) 2.4
8717e79e 748\fBstatfs\fP(2) 1.0
09de4bf1 749\fBstatfs64\fP(2) 2.6
2156a733 750\fBstatx\fP(2) 4.11
8717e79e 751\fBstime\fP(2) 1.0
30e3e116
MK
752\fBsubpage_prot\fP(2) 2.6.25 T{
753PowerPC/PowerPC64 only
754T}
755\fBswapcontext\fP(2) 2.6.3 T{
756PowerPC/PowerPC64 only
757T}
e07c81fe
ES
758.\" 529d235a0e190ded1d21ccc80a73e625ebcad09b
759\fBswitch_endian\fP(2) 4.1 PowerPC64 only
8717e79e
MK
760\fBswapoff\fP(2) 1.0
761\fBswapon\fP(2) 1.0
762\fBsymlink\fP(2) 1.0
09de4bf1 763\fBsymlinkat\fP(2) 2.6.16
8717e79e 764\fBsync\fP(2) 1.0
09de4bf1 765\fBsync_file_range\fP(2) 2.6.17
b58839b9 766\fBsync_file_range2\fP(2) 2.6.22
83225c1f
MK
767.\" PowerPC, ARM, tile
768.\" First appeared on ARM, as arm_sync_file_range(), but later renamed
af4c9a82 769.\" \fBsys_debug_setcontext\fP(2) ??? PowerPC if CONFIG_PPC32
dc43a891 770\fBsyncfs\fP(2) 2.6.39
e07c81fe 771\fBsys_debug_setcontext\fP(2) 2.6.11 PowerPC only
d0a395a2
MK
772\fBsyscall\fP(2) 1.0 T{
773Still available on ARM OABI
d0a395a2
MK
774and MIPS O32 ABI
775T}
dc2f5549 776\fBsysfs\fP(2) 1.2
8717e79e
MK
777\fBsysinfo\fP(2) 1.0
778\fBsyslog\fP(2) 1.0
7d50a840 779.\" glibc interface is \fBklogctl\fP(3)
e07c81fe 780\fBsysmips\fP(2) 2.6.0 MIPS only
09de4bf1
MK
781\fBtee\fP(2) 2.6.17
782\fBtgkill\fP(2) 2.6
8717e79e 783\fBtime\fP(2) 1.0
09de4bf1
MK
784\fBtimer_create\fP(2) 2.6
785\fBtimer_delete\fP(2) 2.6
786\fBtimer_getoverrun\fP(2) 2.6
787\fBtimer_gettime\fP(2) 2.6
788\fBtimer_settime\fP(2) 2.6
a5819baa
MK
789.\" .\" b215e283992899650c4271e7385c79e26fb9a88e
790.\" .\" 4d672e7ac79b5ec5cdc90e450823441e20464691
791.\" \fBtimerfd\fP(2) 2.6.22 T{
792.\" Old timerfd interface,
793.\" removed in 2.6.25
794.\" T}
0df29603
MK
795\fBtimerfd_create\fP(2) 2.6.25
796\fBtimerfd_gettime\fP(2) 2.6.25
797\fBtimerfd_settime\fP(2) 2.6.25
8717e79e 798\fBtimes\fP(2) 1.0
09de4bf1 799\fBtkill\fP(2) 2.6; 2.4.22
8717e79e 800\fBtruncate\fP(2) 1.0
09de4bf1
MK
801\fBtruncate64\fP(2) 2.4
802\fBugetrlimit\fP(2) 2.4
8717e79e
MK
803\fBumask\fP(2) 1.0
804\fBumount\fP(2) 1.0
09de4bf1
MK
805.\" sys_oldumount() -- __NR_umount
806\fBumount2\fP(2) 2.2
807.\" sys_umount() -- __NR_umount2
8717e79e
MK
808\fBuname\fP(2) 1.0
809\fBunlink\fP(2) 1.0
09de4bf1
MK
810\fBunlinkat\fP(2) 2.6.16
811\fBunshare\fP(2) 2.6.16
8717e79e
MK
812\fBuselib\fP(2) 1.0
813\fBustat\fP(2) 1.0
89bfeedf 814\fBuserfaultfd\fP(2) 4.3
e07c81fe
ES
815\fBusr26\fP(2) 2.4.8.1 ARM OABI only
816\fBusr32\fP(2) 2.4.8.1 ARM OABI only
8717e79e 817\fButime\fP(2) 1.0
09de4bf1 818\fButimensat\fP(2) 2.6.22
d3ea5e99 819\fButimes\fP(2) 2.2
e07c81fe 820\fButrap_install\fP(2) 2.2 SPARC64 only
bea08fec 821.\" FIXME . document utrap_install()
38291c52 822.\" There's a man page for Solaris 5.11
8717e79e
MK
823\fBvfork\fP(2) 2.2
824\fBvhangup\fP(2) 1.0
b6bc918e
MK
825\fBvm86old\fP(2) 1.0 T{
826Was "vm86"; renamed in
8272.0.28/2.2
828T}
8717e79e 829\fBvm86\fP(2) 2.0.28; 2.2
09de4bf1 830\fBvmsplice\fP(2) 2.6.17
8717e79e 831\fBwait4\fP(2) 1.0
09de4bf1 832\fBwaitid\fP(2) 2.6.10
8717e79e
MK
833\fBwaitpid\fP(2) 1.0
834\fBwrite\fP(2) 1.0
dc2f5549 835\fBwritev\fP(2) 2.0
e07c81fe
ES
836.\" 5a0015d62668e64c8b6e02e360fbbea121bfd5e6
837\fBxtensa\fP(2) 2.6.13 Xtensa only
09de4bf1 838.TE
c6d039a3 839.P
929f1ff7 840On many platforms, including x86-32, socket calls are all multiplexed
7d50a840
MK
841(via glibc wrapper functions) through
842.BR socketcall (2)
efbfd7ec 843and similarly System\ V IPC calls are multiplexed through
7d50a840 844.BR ipc (2).
c6d039a3 845.P
09de4bf1 846Although slots are reserved for them in the system call table,
e0bf9127 847the following system calls are not implemented in the standard kernel:
09de4bf1
MK
848.BR afs_syscall (2), \" __NR_afs_syscall is 53 on Linux 2.6.22/i386
849.BR break (2), \" __NR_break is 17 on Linux 2.6.22/i386
850.BR ftime (2), \" __NR_ftime is 35 on Linux 2.6.22/i386
851.BR getpmsg (2), \" __NR_getpmsg is 188 on Linux 2.6.22/i386
852.BR gtty (2), \" __NR_gtty is 32 on Linux 2.6.22/i386
853.BR idle (2), \" __NR_idle is 112 on Linux 2.6.22/i386
854.BR lock (2), \" __NR_lock is 53 on Linux 2.6.22/i386
855.BR madvise1 (2), \" __NR_madvise1 is 219 on Linux 2.6.22/i386
856.BR mpx (2), \" __NR_mpx is 66 on Linux 2.6.22/i386
3b777aff 857.BR phys (2), \" Slot has been reused
09de4bf1
MK
858.BR prof (2), \" __NR_prof is 44 on Linux 2.6.22/i386
859.BR profil (2), \" __NR_profil is 98 on Linux 2.6.22/i386
860.BR putpmsg (2), \" __NR_putpmsg is 189 on Linux 2.6.22/i386
f9e4d811
MK
861.\" __NR_security is 223 on Linux 2.4/i386; absent on 2.6/i386, present
862.\" on a couple of 2.6 architectures
863.BR security (2), \" __NR_security is 223 on Linux 2.4/i386
0597933f 864.\" The security call is for future use.
09de4bf1 865.BR stty (2), \" __NR_stty is 31 on Linux 2.6.22/i386
af4c9a82 866.BR tuxcall (2), \" __NR_tuxcall is 184 on x86_64, also on PPC and alpha
09de4bf1
MK
867.BR ulimit (2), \" __NR_ulimit is 58 on Linux 2.6.22/i386
868and
869.BR vserver (2) \" __NR_vserver is 273 on Linux 2.6.22/i386
fea681da 870(see also
fea681da
MK
871.BR unimplemented (2)).
872However,
873.BR ftime (3),
b701f72d 874.BR profil (3),
fea681da
MK
875and
876.BR ulimit (3)
877exist as library routines.
09de4bf1
MK
878The slot for
879.BR phys (2)
b324e17d 880is in use since Linux 2.1.116 for
09de4bf1 881.BR umount (2);
e0bf9127 882.BR phys (2)
09de4bf1 883will never be implemented.
09de4bf1
MK
884The
885.BR getpmsg (2)
886and
887.BR putpmsg (2)
888calls are for kernels patched to support STREAMS,
889and may never be in the standard kernel.
c6d039a3 890.P
98309d3f
MK
891There was briefly
892.BR set_zone_reclaim (2),
b324e17d 893added in Linux 2.6.13, and removed in Linux 2.6.16;
7fac88a9 894this system call was never available to user space.
14dd128c
MK
895.\"
896.SS System calls on removed ports
897Some system calls only ever existed on Linux architectures that have
898since been removed from the kernel:
899.TP
900AVR32 (port removed in Linux 4.12)
901.RS
902.PD 0
cdede5cd 903.IP \[bu] 3
14dd128c 904.BR pread (2)
cdede5cd 905.IP \[bu]
14dd128c
MK
906.BR pwrite (2)
907.PD
908.RE
909.TP
910Blackfin (port removed in Linux 4.17)
911.RS
912.PD 0
cdede5cd 913.IP \[bu] 3
14dd128c
MK
914.BR bfin_spinlock (2)
915(added in Linux 2.6.22)
cdede5cd 916.IP \[bu]
14dd128c
MK
917.BR dma_memcpy (2)
918(added in Linux 2.6.22)
cdede5cd 919.IP \[bu]
14dd128c
MK
920.BR pread (2)
921(added in Linux 2.6.22)
cdede5cd 922.IP \[bu]
14dd128c
MK
923.BR pwrite (2)
924(added in Linux 2.6.22)
cdede5cd 925.IP \[bu]
14dd128c
MK
926.BR sram_alloc (2)
927(added in Linux 2.6.22)
cdede5cd 928.IP \[bu]
14dd128c
MK
929.BR sram_free (2)
930(added in Linux 2.6.22)
931.PD
932.RE
933.TP
934Metag (port removed in Linux 4.17)
935.RS
936.PD 0
cdede5cd 937.IP \[bu] 3
14dd128c
MK
938.BR metag_get_tls (2)
939(add in Linux 3.9)
cdede5cd 940.IP \[bu]
14dd128c
MK
941.BR metag_set_fpu_flags (2)
942(add in Linux 3.9)
cdede5cd 943.IP \[bu]
14dd128c
MK
944.BR metag_set_tls (2)
945(add in Linux 3.9)
cdede5cd 946.IP \[bu]
14dd128c
MK
947.BR metag_setglobalbit (2)
948(add in Linux 3.9)
949.PD
950.RE
951.TP
952Tile (port removed in Linux 4.17)
953.RS
954.PD 0
cdede5cd 955.IP \[bu] 3
14dd128c
MK
956.BR cmpxchg_badaddr (2)
957(added in Linux 2.6.36)
958.PD
959.RE
0597933f 960.SH NOTES
fea681da
MK
961Roughly speaking, the code belonging to the system call
962with number __NR_xxx defined in
963.I /usr/include/asm/unistd.h
66a9882e 964can be found in the Linux kernel source in the routine
63aa9df0 965.IR sys_xxx ().
fea681da
MK
966There are many exceptions, however, mostly because
967older system calls were superseded by newer ones,
c13182ef
MK
968and this has been treated somewhat unsystematically.
969On platforms with
6c1544c1 970proprietary operating-system emulation,
8c3e6854 971such as sparc, sparc64, and alpha,
fea681da
MK
972there are many additional system calls; mips64 also contains a full
973set of 32-bit system calls.
c6d039a3 974.P
09de4bf1
MK
975Over time, changes to the interfaces of some system calls have been
976necessary.
977One reason for such changes was the need to increase the size of
978structures or scalar values passed to the system call.
d3c49afa
MK
979Because of these changes, certain architectures
980(notably, longstanding 32-bit architectures such as i386)
981now have various groups of related system calls (e.g.,
7d50a840
MK
982.BR truncate (2)
983and
e04e8187 984.BR truncate64 (2))
7d50a840
MK
985which perform similar tasks, but which vary in
986details such as the size of their arguments.
987(As noted earlier, applications are generally unaware of this:
988the glibc wrapper functions do some work to ensure that the right
989system call is invoked, and that ABI compatibility is
990preserved for old binaries.)
3aa341fc 991Examples of system calls that exist in multiple versions are
09de4bf1 992the following:
cdede5cd 993.IP \[bu] 3
7d50a840 994By now there are three different versions of
09de4bf1
MK
995.BR stat (2):
996.IR sys_stat ()
997(slot
998.IR __NR_oldstat ),
999.IR sys_newstat ()
1000(slot
1001.IR __NR_stat ),
fea681da 1002and
92a5f983 1003.IR sys_stat64 ()
09de4bf1
MK
1004(slot
1005.IR __NR_stat64 ),
1006with the last being the most current.
f9e4d811 1007.\" e.g., on 2.6.22/i386: __NR_oldstat 18, __NR_stat 106, __NR_stat64 195
09de4bf1
MK
1008.\" The stat system calls deal with three different data structures,
1009.\" defined in include/asm-i386/stat.h: __old_kernel_stat, stat, stat64
1010A similar story applies for
1011.BR lstat (2)
1012and
1013.BR fstat (2).
cdede5cd 1014.IP \[bu]
09de4bf1
MK
1015Similarly, the defines
1016.IR __NR_oldolduname ,
1017.IR __NR_olduname ,
1018and
0daa9e92 1019.I __NR_uname
09de4bf1
MK
1020refer to the routines
1021.IR sys_olduname (),
d556548b 1022.IR sys_uname (),
09de4bf1
MK
1023and
1024.IR sys_newuname ().
cdede5cd 1025.IP \[bu]
7d50a840 1026In Linux 2.0, a new version of
09de4bf1
MK
1027.BR vm86 (2)
1028appeared, with the old and the new kernel routines being named
1029.IR sys_vm86old ()
1030and
1031.IR sys_vm86 ().
cdede5cd 1032.IP \[bu]
7d50a840 1033In Linux 2.4, a new version of
09de4bf1
MK
1034.BR getrlimit (2)
1035appeared, with the old and the new kernel routines being named
1036.IR sys_old_getrlimit ()
1037(slot
1038.IR __NR_getrlimit )
1039and
1040.IR sys_getrlimit ()
1041(slot
1042.IR __NR_ugetrlimit ).
cdede5cd 1043.IP \[bu]
09de4bf1 1044Linux 2.4 increased the size of user and group IDs from 16 to 32 bits.
5024580d 1045.\" 64-bit off_t changes: ftruncate64, *stat64,
09de4bf1
MK
1046.\" fcntl64 (because of the flock structure), getdents64, *statfs64
1047To support this change, a range of system calls were added
1048(e.g.,
1049.BR chown32 (2),
1050.BR getuid32 (2),
1051.BR getgroups32 (2),
1052.BR setresuid32 (2)),
1053superseding earlier calls of the same name without the
1054"32" suffix.
cdede5cd 1055.IP \[bu]
09de4bf1
MK
1056Linux 2.4 added support for applications on 32-bit architectures
1057to access large files (i.e., files for which the sizes and
1058file offsets can't be represented in 32 bits.)
1059To support this change, replacements were required for system calls
1060that deal with file offsets and sizes.
1061Thus the following system calls were added:
1062.BR fcntl64 (2),
09de4bf1
MK
1063.BR getdents64 (2),
1064.BR stat64 (2),
1065.BR statfs64 (2),
470e3031 1066.BR truncate64 (2),
09de4bf1
MK
1067and their analogs that work with file descriptors or
1068symbolic links.
1069These system calls supersede the older system calls
1070which, except in the case of the "stat" calls,
1071have the same name without the "64" suffix.
efeece04 1072.IP
d3c49afa
MK
1073On newer platforms that only have 64-bit file access and 32-bit UIDs/GIDs
1074(e.g., alpha, ia64, s390x, x86-64), there is just a single version of
1075the UID/GID and file access system calls.
1076On platforms (typically, 32-bit platforms) where the *64 and *32 calls exist,
1077the other versions are obsolete.
cdede5cd 1078.IP \[bu]
09de4bf1
MK
1079The
1080.I rt_sig*
b324e17d 1081calls were added in Linux 2.2 to support the addition
09de4bf1
MK
1082of real-time signals (see
1083.BR signal (7)).
1084These system calls supersede the older system calls of the same
1085name without the "rt_" prefix.
cdede5cd 1086.IP \[bu]
7d50a840
MK
1087The
1088.BR select (2)
fea681da 1089and
7d50a840 1090.BR mmap (2)
c4bb193f 1091system calls use five or more arguments,
208088b5 1092which caused problems in the way
c4bb193f 1093argument passing on the i386 used to be set up.
7d50a840 1094Thus, while other architectures have
09de4bf1
MK
1095.IR sys_select ()
1096and
1097.IR sys_mmap ()
1098corresponding to
0daa9e92 1099.I __NR_select
09de4bf1
MK
1100and
1101.IR __NR_mmap ,
1102on i386 one finds
1103.IR old_select ()
1104and
1105.IR old_mmap ()
48235a56 1106(routines that use a pointer to an
c4bb193f
MK
1107argument block) instead.
1108These days passing five arguments
09de4bf1 1109is not a problem any more, and there is a
0daa9e92 1110.I __NR__newselect
7d50a840
MK
1111.\" (used by libc 6)
1112that corresponds directly to
09de4bf1
MK
1113.IR sys_select ()
1114and similarly
7d50a840 1115.IR __NR_mmap2 .
ee7a193d
ES
1116s390x is the only 64-bit architecture that has
1117.IR old_mmap ().
c6d039a3 1118.\" .P
7d50a840
MK
1119.\" Two system call numbers,
1120.\" .IR __NR__llseek
1121.\" and
1122.\" .IR __NR__sysctl
1123.\" have an additional underscore absent in
1124.\" .IR sys_llseek ()
1125.\" and
1126.\" .IR sys_sysctl ().
e0bf9127 1127.\"
b324e17d 1128.\" In Linux 2.1.81,
7d50a840 1129.\" .BR lchown (2)
e0bf9127 1130.\" and
7d50a840
MK
1131.\" .BR chown (2)
1132.\" were swapped; that is,
1133.\" .BR lchown (2)
1134.\" was added with the semantics that were then current for
1135.\" .BR chown (2),
1136.\" and the semantics of the latter call were changed to what
1137.\" they are today.
d0a395a2
MK
1138.\"
1139.\"
1140.SS "Architecture-specific details: Alpha"
4279e42d 1141.TP
d0a395a2
MK
1142.BR getxgid (2)
1143returns a pair of GID and effective GID via registers
1144\fBr0\fP and \fBr20\fP; it is provided
1145instead of
1146\fBgetgid\fP(2) and \fBgetegid\fP(2).
4279e42d 1147.TP
d0a395a2
MK
1148.BR getxpid (2)
1149returns a pair of PID and parent PID via registers
1150\fBr0\fP and \fBr20\fP; it is provided instead of
1151\fBgetpid\fP(2) and \fBgetppid\fP(2).
4279e42d 1152.TP
d0a395a2
MK
1153.BR old_adjtimex (2)
1154is a variant of \fBadjtimex\fP(2) that uses \fIstruct timeval32\fP,
1155for compatibility with OSF/1.
4279e42d 1156.TP
d0a395a2
MK
1157.BR getxuid (2)
1158returns a pair of GID and effective GID via registers
1159\fBr0\fP and \fBr20\fP; it is provided instead of
1160\fBgetuid\fP(2) and \fBgeteuid\fP(2).
4279e42d 1161.TP
d0a395a2
MK
1162.BR sethae (2)
1163is used for configuring the Host Address Extension register on
1164low-cost Alphas in order to access address space beyond first 27 bits.
09de4bf1 1165.SH SEE ALSO
ab59d225 1166.BR ausyscall (1),
b73bf0ae 1167.BR intro (2),
09de4bf1 1168.BR syscall (2),
de9ed3a3 1169.BR unimplemented (2),
5bc20f9e 1170.BR errno (3),
951ae9c0
MF
1171.BR libc (7),
1172.BR vdso (7)