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