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