vdso.7: Minor tweak to Alejandro Colomar's patch
[man-pages.git] / man2 / syscalls.2
blob42916e8ec5cc95a278301ab5fd91dda5524651f8
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 \fBlchown\fP(2) 1.0     T{
416 See \fBchown\fP(2) for
417 version details
419 \fBlchown32\fP(2)       2.4
420 \fBlgetxattr\fP(2)      2.6; 2.4.18
421 \fBlink\fP(2)   1.0
422 \fBlinkat\fP(2) 2.6.16
423 \fBlisten\fP(2) 2.0     T{
424 See notes on \fBsocketcall\fP(2)
426 \fBlistxattr\fP(2)      2.6; 2.4.18
427 \fBllistxattr\fP(2)     2.6; 2.4.18
428 \fBlookup_dcookie\fP(2) 2.6
429 \fBlremovexattr\fP(2)   2.6; 2.4.18
430 \fBlseek\fP(2)  1.0
431 \fBlsetxattr\fP(2)      2.6; 2.4.18
432 \fBlstat\fP(2)  1.0
433 \fBlstat64\fP(2)        2.4
434 \fBmadvise\fP(2)        2.4
435 \fBmbind\fP(2)  2.6.6
436 \fBmemory_ordering\fP(2)        2.2     SPARC64 only
437 .\" 26025bbfbba33a9425be1b89eccb4664ea4c17b6
438 .\" bb6fb6dfcc17cddac11ac295861f7608194447a7
439 \fBmembarrier\fP(2)     3.17
440 \fBmemfd_create\fP(2)   3.17
441 \fBmigrate_pages\fP(2)  2.6.16
442 \fBmincore\fP(2)        2.4
443 \fBmkdir\fP(2)  1.0
444 \fBmkdirat\fP(2)        2.6.16
445 \fBmknod\fP(2)  1.0
446 \fBmknodat\fP(2)        2.6.16
447 \fBmlock\fP(2)  2.0
448 \fBmlock2\fP(2) 4.4
449 \fBmlockall\fP(2)       2.0
450 \fBmmap\fP(2)   1.0
451 \fBmmap2\fP(2)  2.4
452 \fBmodify_ldt\fP(2)     1.0
453 \fBmount\fP(2)  1.0
454 \fBmove_mount\fP(2)     5.2
455 \fBmove_pages\fP(2)     2.6.18
456 \fBmprotect\fP(2)       1.0
457 \fBmq_getsetattr\fP(2)  2.6.6
458 .\" Implements \fBmq_getattr\fP(3) and \fBmq_setattr\fP(3)
459 \fBmq_notify\fP(2)      2.6.6
460 \fBmq_open\fP(2)        2.6.6
461 \fBmq_timedreceive\fP(2)        2.6.6
462 \fBmq_timedsend\fP(2)   2.6.6
463 \fBmq_unlink\fP(2)      2.6.6
464 \fBmremap\fP(2) 2.0
465 \fBmsgctl\fP(2) 2.0     T{
466 See notes on \fBipc\fP(2)
468 \fBmsgget\fP(2) 2.0     T{
469 See notes on \fBipc\fP(2)
471 \fBmsgrcv\fP(2) 2.0     T{
472 See notes on \fBipc\fP(2)
474 \fBmsgsnd\fP(2) 2.0     T{
475 See notes on \fBipc\fP(2)
477 \fBmsync\fP(2)  2.0
478 .\" \fBmultiplexer\fP(2)        ??      __NR_multiplexer reserved on
479 .\"             PowerPC, but unimplemented?
480 \fBmunlock\fP(2)        2.0
481 \fBmunlockall\fP(2)     2.0
482 \fBmunmap\fP(2) 1.0
483 \fBname_to_handle_at\fP(2)      2.6.39
484 \fBnanosleep\fP(2)      2.0
485 .\" 5590ff0d5528b60153c0b4e7b771472b5a95e297
486 \fBnewfstatat\fP(2)     2.6.16  See \fBstat\fP(2)
487 \fBnfsservctl\fP(2)     2.2     Removed in 3.1
488 \fBnice\fP(2)   1.0
489 \fBold_adjtimex\fP(2)   2.0     T{
490 Alpha only; see NOTES
492 \fBold_getrlimit\fP(2)  2.4     T{
493 Old variant of \fBgetrlimit\fP(2)
494 that used a different value
495 for \fBRLIM_INFINITY\fP
497 \fBoldfstat\fP(2)       1.0
498 \fBoldlstat\fP(2)       1.0
499 \fBoldolduname\fP(2)    1.0
500 \fBoldstat\fP(2)        1.0
501 \fBoldumount\fP(2)      2.4.116 T{
502 Name of the old \fBumount\fP(2)
503 syscall on Alpha
505 \fBolduname\fP(2)       1.0
506 \fBopen\fP(2)   1.0
507 \fBopen_by_handle_at\fP(2)      2.6.39
508 \fBopen_tree\fP(2)      5.2
509 \fBopenat\fP(2) 2.6.16
510 \fBopenat2\fP(2)        5.6
511 .\" 9d02a4283e9ce4e9ca11ff00615bdacdb0515a1a
512 \fBor1k_atomic\fP(2)    3.1     T{
513 OpenRISC 1000 only
515 \fBpause\fP(2)  1.0
516 \fBpciconfig_iobase\fP(2)       2.2.15; 2.4     Not on x86
517 .\" Alpha, PowerPC, ARM; not x86
518 \fBpciconfig_read\fP(2) 2.0.26; 2.2     Not on x86
519 .\" , PowerPC, ARM; not x86
520 \fBpciconfig_write\fP(2)        2.0.26; 2.2     Not on x86
521 .\" , PowerPC, ARM; not x86
522 \fBperf_event_open\fP(2)        2.6.31  T{
523 Was perf_counter_open() in
524 2.6.31; renamed in 2.6.32
526 \fBpersonality\fP(2)    1.2
527 \fBperfctr\fP(2)        2.2     T{
528 SPARC only; removed in 2.6.34
530 .\"     commit c7d5a0050773e98d1094eaa9f2a1a793fafac300 removed perfctr()
531 \fBperfmonctl\fP(2)     2.4     IA-64 only; removed in 5.10
532 \fBpidfd_getfd\fP(2)    5.6
533 \fBpidfd_send_signal\fP(2)      5.1
534 \fBpidfd_open\fP(2)     5.3
535 \fBpipe\fP(2)   1.0
536 \fBpipe2\fP(2)  2.6.27
537 \fBpivot_root\fP(2)     2.4
538 \fBpkey_alloc\fP(2)     4.8
539 \fBpkey_free\fP(2)      4.8
540 \fBpkey_mprotect\fP(2)  4.8
541 \fBpoll\fP(2)   2.0.36; 2.2
542 \fBppoll\fP(2)  2.6.16
543 \fBprctl\fP(2)  2.2
544 \fBpread64\fP(2)                T{
545 Added as "pread" in 2.2;
546 renamed "pread64" in 2.6
548 \fBpreadv\fP(2) 2.6.30
549 \fBpreadv2\fP(2)        4.6
550 \fBprlimit64\fP(2)      2.6.36
551 \fBprocess_madvise\fP(2)        5.10
552 \fBprocess_vm_readv\fP(2)       3.2
553 \fBprocess_vm_writev\fP(2)      3.2
554 \fBpselect6\fP(2)       2.6.16
555 .\" Implements \fBpselect\fP(2)
556 \fBptrace\fP(2) 1.0
557 \fBpwrite64\fP(2)               T{
558 Added as "pwrite" in 2.2;
559 renamed "pwrite64" in 2.6
561 \fBpwritev\fP(2)        2.6.30
562 \fBpwritev2\fP(2)       4.6
563 \fBquery_module\fP(2)   2.2     Removed in 2.6
564 \fBquotactl\fP(2)       1.0
565 \fBread\fP(2)   1.0
566 \fBreadahead\fP(2)      2.4.13
567 \fBreaddir\fP(2)        1.0
568 .\" Supersedes \fBgetdents\fP(2)
569 \fBreadlink\fP(2)       1.0
570 \fBreadlinkat\fP(2)     2.6.16
571 \fBreadv\fP(2)  2.0
572 \fBreboot\fP(2) 1.0
573 \fBrecv\fP(2)   2.0     T{
574 See notes on \fBsocketcall\fP(2)
576 \fBrecvfrom\fP(2)       2.0     T{
577 See notes on \fBsocketcall\fP(2)
579 \fBrecvmsg\fP(2)        2.0     T{
580 See notes on \fBsocketcall\fP(2)
582 \fBrecvmmsg\fP(2)       2.6.33
583 \fBremap_file_pages\fP(2)       2.6     T{
584 Deprecated since 3.16
586 \fBremovexattr\fP(2)    2.6; 2.4.18
587 \fBrename\fP(2) 1.0
588 \fBrenameat\fP(2)       2.6.16
589 \fBrenameat2\fP(2)      3.15
590 \fBrequest_key\fP(2)    2.6.10
591 \fBrestart_syscall\fP(2)        2.6
592 .\" 921ebd8f2c081b3cf6c3b29ef4103eef3ff26054
593 \fBriscv_flush_icache\fP(2)     4.15    RISC-V only
594 \fBrmdir\fP(2)  1.0
595 \fBrseq\fP(2)   4.18
596 \fBrt_sigaction\fP(2)   2.2
597 \fBrt_sigpending\fP(2)  2.2
598 \fBrt_sigprocmask\fP(2) 2.2
599 \fBrt_sigqueueinfo\fP(2)        2.2
600 \fBrt_sigreturn\fP(2)   2.2
601 \fBrt_sigsuspend\fP(2)  2.2
602 \fBrt_sigtimedwait\fP(2)        2.2
603 \fBrt_tgsigqueueinfo\fP(2)      2.6.31
604 \fBrtas\fP(2)   2.6.2   T{
605 PowerPC/PowerPC64 only
607 \fBs390_runtime_instr\fP(2)     3.7     s390 only
608 \fBs390_pci_mmio_read\fP(2)     3.19    s390 only
609 \fBs390_pci_mmio_write\fP(2)    3.19    s390 only
610 \fBs390_sthyi\fP(2)     4.15    s390 only
611 \fBs390_guarded_storage\fP(2)   4.12    s390 only
612 \fBsched_get_affinity\fP(2)     2.6     T{
613 Name of \fBsched_getaffinity\fP(2)
614 on SPARC and SPARC64
616 \fBsched_get_priority_max\fP(2) 2.0
617 \fBsched_get_priority_min\fP(2) 2.0
618 \fBsched_getaffinity\fP(2)      2.6
619 \fBsched_getattr\fP(2)  3.14
620 \fBsched_getparam\fP(2) 2.0
621 \fBsched_getscheduler\fP(2)     2.0
622 \fBsched_rr_get_interval\fP(2)  2.0
623 \fBsched_set_affinity\fP(2)     2.6     T{
624 Name of \fBsched_setaffinity\fP(2)
625 on SPARC and SPARC64
627 \fBsched_setaffinity\fP(2)      2.6
628 \fBsched_setattr\fP(2)  3.14
629 \fBsched_setparam\fP(2) 2.0
630 \fBsched_setscheduler\fP(2)     2.0
631 \fBsched_yield\fP(2)    2.0
632 \fBseccomp\fP(2)        3.17
633 \fBselect\fP(2) 1.0
634 \fBsemctl\fP(2) 2.0     T{
635 See notes on \fBipc\fP(2)
637 \fBsemget\fP(2) 2.0     T{
638 See notes on \fBipc\fP(2)
640 \fBsemop\fP(2)  2.0     T{
641 See notes on \fBipc\fP(2)
643 \fBsemtimedop\fP(2)     2.6; 2.4.22
644 \fBsend\fP(2)   2.0     T{
645 See notes on \fBsocketcall\fP(2)
647 \fBsendfile\fP(2)       2.2
648 \fBsendfile64\fP(2)     2.6; 2.4.19
649 \fBsendmmsg\fP(2)       3.0
650 \fBsendmsg\fP(2)        2.0     T{
651 See notes on \fBsocketcall\fP(2)
653 \fBsendto\fP(2) 2.0     T{
654 See notes on \fBsocketcall\fP(2)
656 \fBset_mempolicy\fP(2)  2.6.6
657 \fBset_robust_list\fP(2)        2.6.17
658 \fBset_thread_area\fP(2)        2.6
659 \fBset_tid_address\fP(2)        2.6
660 \fBset_tls\fP(2)        2.6.11  T{
661 ARM OABI/EABI only (constant
662 has \fB__ARM_NR\fP prefix)
664 .\" \fBsetaltroot\fP(2) 2.6.10  T{
665 .\" Removed in 2.6.11, exposed one
666 .\" of implementation details of
667 .\" \fBpersonality\fP(2) (creating an
668 .\" alternative root, precursor of
669 .\" mount namespaces) to user space.
670 .\" T}
671 .\" See http://lkml.org/lkml/2005/8/1/83
672 .\" "[PATCH] remove sys_set_zone_reclaim()"
673 \fBsetdomainname\fP(2)  1.0
674 \fBsetfsgid\fP(2)       1.2
675 \fBsetfsgid32\fP(2)     2.4
676 \fBsetfsuid\fP(2)       1.2
677 \fBsetfsuid32\fP(2)     2.4
678 \fBsetgid\fP(2) 1.0
679 \fBsetgid32\fP(2)       2.4
680 \fBsetgroups\fP(2)      1.0
681 \fBsetgroups32\fP(2)    2.4
682 .\" arch/alpha/include/asm/core_lca.h
683 \fBsethae\fP(2) 2.0     T{
684 Alpha only; see NOTES
686 \fBsethostname\fP(2)    1.0
687 \fBsetitimer\fP(2)      1.0
688 \fBsetns\fP(2)  3.0
689 \fBsetpgid\fP(2)        1.0
690 \fBsetpgrp\fP(2)        2.0     T{
691 Alternative name for
692 \fBsetpgid\fP(2) on Alpha
694 \fBsetpriority\fP(2)    1.0
695 \fBsetregid\fP(2)       1.0
696 \fBsetregid32\fP(2)     2.4
697 \fBsetresgid\fP(2)      2.2
698 \fBsetresgid32\fP(2)    2.4
699 \fBsetresuid\fP(2)      2.2
700 \fBsetresuid32\fP(2)    2.4
701 \fBsetreuid\fP(2)       1.0
702 \fBsetreuid32\fP(2)     2.4
703 \fBsetrlimit\fP(2)      1.0
704 \fBsetsid\fP(2) 1.0
705 \fBsetsockopt\fP(2)     2.0     T{
706 See notes on \fBsocketcall\fP(2)
708 \fBsettimeofday\fP(2)   1.0
709 \fBsetuid\fP(2) 1.0
710 \fBsetuid32\fP(2)       2.4
711 \fBsetup\fP(2)  1.0     Removed in 2.2
712 \fBsetxattr\fP(2)       2.6; 2.4.18
713 \fBsgetmask\fP(2)       1.0
714 \fBshmat\fP(2)  2.0     T{
715 See notes on \fBipc\fP(2)
717 \fBshmctl\fP(2) 2.0     T{
718 See notes on \fBipc\fP(2)
720 \fBshmdt\fP(2)  2.0     T{
721 See notes on \fBipc\fP(2)
723 \fBshmget\fP(2) 2.0     T{
724 See notes on \fBipc\fP(2)
726 \fBshutdown\fP(2)       2.0     T{
727 See notes on \fBsocketcall\fP(2)
729 \fBsigaction\fP(2)      1.0
730 \fBsigaltstack\fP(2)    2.2
731 \fBsignal\fP(2) 1.0
732 \fBsignalfd\fP(2)       2.6.22
733 \fBsignalfd4\fP(2)      2.6.27
734 \fBsigpending\fP(2)     1.0
735 \fBsigprocmask\fP(2)    1.0
736 \fBsigreturn\fP(2)      1.0
737 \fBsigsuspend\fP(2)     1.0
738 \fBsocket\fP(2) 2.0     T{
739 See notes on \fBsocketcall\fP(2)
741 \fBsocketcall\fP(2)     1.0
742 .\" Implements BSD socket calls
743 \fBsocketpair\fP(2)     2.0     T{
744 See notes on \fBsocketcall\fP(2)
746 .\" 5a0015d62668e64c8b6e02e360fbbea121bfd5e6
747 \fBspill\fP(2)  2.6.13  Xtensa only
748 \fBsplice\fP(2) 2.6.17
749 \fBspu_create\fP(2)     2.6.16  T{
750 PowerPC/PowerPC64 only
752 \fBspu_run\fP(2)        2.6.16  T{
753 PowerPC/PowerPC64 only
755 \fBssetmask\fP(2)       1.0
756 \fBstat\fP(2)   1.0
757 \fBstat64\fP(2) 2.4
758 \fBstatfs\fP(2) 1.0
759 \fBstatfs64\fP(2)       2.6
760 \fBstatx\fP(2)  4.11
761 \fBstime\fP(2)  1.0
762 \fBsubpage_prot\fP(2)   2.6.25  T{
763 PowerPC/PowerPC64 only
765 \fBswapcontext\fP(2)    2.6.3   T{
766 PowerPC/PowerPC64 only
768 .\" 529d235a0e190ded1d21ccc80a73e625ebcad09b
769 \fBswitch_endian\fP(2)  4.1     PowerPC64 only
770 \fBswapoff\fP(2)        1.0
771 \fBswapon\fP(2) 1.0
772 \fBsymlink\fP(2)        1.0
773 \fBsymlinkat\fP(2)      2.6.16
774 \fBsync\fP(2)   1.0
775 \fBsync_file_range\fP(2)        2.6.17
776 \fBsync_file_range2\fP(2)       2.6.22
777 .\" PowerPC, ARM, tile
778 .\" First appeared on ARM, as arm_sync_file_range(), but later renamed
779 .\" \fBsys_debug_setcontext\fP(2)       ???     PowerPC if CONFIG_PPC32
780 \fBsyncfs\fP(2) 2.6.39
781 \fBsys_debug_setcontext\fP(2)   2.6.11  PowerPC only
782 \fBsyscall\fP(2)        1.0     T{
783 Still available on ARM OABI
784 and MIPS O32 ABI
786 \fBsysfs\fP(2)  1.2
787 \fBsysinfo\fP(2)        1.0
788 \fBsyslog\fP(2) 1.0
789 .\" glibc interface is \fBklogctl\fP(3)
790 \fBsysmips\fP(2)        2.6.0   MIPS only
791 \fBtee\fP(2)    2.6.17
792 \fBtgkill\fP(2) 2.6
793 \fBtime\fP(2)   1.0
794 \fBtimer_create\fP(2)   2.6
795 \fBtimer_delete\fP(2)   2.6
796 \fBtimer_getoverrun\fP(2)       2.6
797 \fBtimer_gettime\fP(2)  2.6
798 \fBtimer_settime\fP(2)  2.6
799 .\" .\" b215e283992899650c4271e7385c79e26fb9a88e
800 .\" .\" 4d672e7ac79b5ec5cdc90e450823441e20464691
801 .\" \fBtimerfd\fP(2)    2.6.22  T{
802 .\" Old timerfd interface,
803 .\" removed in 2.6.25
804 .\" T}
805 \fBtimerfd_create\fP(2) 2.6.25
806 \fBtimerfd_gettime\fP(2)        2.6.25
807 \fBtimerfd_settime\fP(2)        2.6.25
808 \fBtimes\fP(2)  1.0
809 \fBtkill\fP(2)  2.6; 2.4.22
810 \fBtruncate\fP(2)       1.0
811 \fBtruncate64\fP(2)     2.4
812 \fBugetrlimit\fP(2)     2.4
813 \fBumask\fP(2)  1.0
814 \fBumount\fP(2) 1.0
815 .\" sys_oldumount() -- __NR_umount
816 \fBumount2\fP(2)        2.2
817 .\" sys_umount() -- __NR_umount2
818 \fBuname\fP(2)  1.0
819 \fBunlink\fP(2) 1.0
820 \fBunlinkat\fP(2)       2.6.16
821 \fBunshare\fP(2)        2.6.16
822 \fBuselib\fP(2) 1.0
823 \fBustat\fP(2)  1.0
824 \fBuserfaultfd\fP(2)    4.3
825 \fBusr26\fP(2)  2.4.8.1 ARM OABI only
826 \fBusr32\fP(2)  2.4.8.1 ARM OABI only
827 \fButime\fP(2)  1.0
828 \fButimensat\fP(2)      2.6.22
829 \fButimes\fP(2) 2.2
830 \fButrap_install\fP(2)  2.2     SPARC64 only
831 .\" FIXME . document utrap_install()
832 .\" There's a man page for Solaris 5.11
833 \fBvfork\fP(2)  2.2
834 \fBvhangup\fP(2)        1.0
835 \fBvm86old\fP(2)        1.0     T{
836 Was "vm86"; renamed in
837 2.0.28/2.2
839 \fBvm86\fP(2)   2.0.28; 2.2
840 \fBvmsplice\fP(2)       2.6.17
841 \fBwait4\fP(2)  1.0
842 \fBwaitid\fP(2) 2.6.10
843 \fBwaitpid\fP(2)        1.0
844 \fBwrite\fP(2)  1.0
845 \fBwritev\fP(2) 2.0
846 .\" 5a0015d62668e64c8b6e02e360fbbea121bfd5e6
847 \fBxtensa\fP(2) 2.6.13  Xtensa only
852 On many platforms, including x86-32, socket calls are all multiplexed
853 (via glibc wrapper functions) through
854 .BR socketcall (2)
855 and similarly System\ V IPC calls are multiplexed through
856 .BR ipc (2).
858 Although slots are reserved for them in the system call table,
859 the following system calls are not implemented in the standard kernel:
860 .BR afs_syscall (2), \" __NR_afs_syscall is 53 on Linux 2.6.22/i386
861 .BR break (2),       \" __NR_break is 17 on Linux 2.6.22/i386
862 .BR ftime (2),       \" __NR_ftime is 35 on Linux 2.6.22/i386
863 .BR getpmsg (2),     \" __NR_getpmsg is 188 on Linux 2.6.22/i386
864 .BR gtty (2),        \" __NR_gtty is 32 on Linux 2.6.22/i386
865 .BR idle (2),        \" __NR_idle is 112 on Linux 2.6.22/i386
866 .BR lock (2),        \" __NR_lock is 53 on Linux 2.6.22/i386
867 .BR madvise1 (2),    \" __NR_madvise1 is 219 on Linux 2.6.22/i386
868 .BR mpx (2),         \" __NR_mpx is 66 on Linux 2.6.22/i386
869 .BR phys (2),        \" Slot has been reused
870 .BR prof (2),        \" __NR_prof is 44 on Linux 2.6.22/i386
871 .BR profil (2),      \" __NR_profil is 98 on Linux 2.6.22/i386
872 .BR putpmsg (2),     \" __NR_putpmsg is 189 on Linux 2.6.22/i386
873 .\" __NR_security is 223 on Linux 2.4/i386; absent on 2.6/i386, present
874 .\" on a couple of 2.6 architectures
875 .BR security (2),    \" __NR_security is 223 on Linux 2.4/i386
876 .\" The security call is for future use.
877 .BR stty (2),        \" __NR_stty is 31 on Linux 2.6.22/i386
878 .BR tuxcall (2),     \" __NR_tuxcall is 184 on x86_64, also on PPC and alpha
879 .BR ulimit (2),      \" __NR_ulimit is 58 on Linux 2.6.22/i386
881 .BR vserver (2)      \" __NR_vserver is 273 on Linux 2.6.22/i386
882 (see also
883 .BR unimplemented (2)).
884 However,
885 .BR ftime (3),
886 .BR profil (3),
888 .BR ulimit (3)
889 exist as library routines.
890 The slot for
891 .BR phys (2)
892 is in use since kernel 2.1.116 for
893 .BR umount (2);
894 .BR phys (2)
895 will never be implemented.
897 .BR getpmsg (2)
899 .BR putpmsg (2)
900 calls are for kernels patched to support STREAMS,
901 and may never be in the standard kernel.
903 There was briefly
904 .BR set_zone_reclaim (2),
905 added in Linux 2.6.13, and removed in 2.6.16;
906 this system call was never available to user space.
908 .SS System calls on removed ports
909 Some system calls only ever existed on Linux architectures that have
910 since been removed from the kernel:
912 AVR32 (port removed in Linux 4.12)
914 .PD 0
915 .IP * 2
916 .BR pread (2)
917 .IP *
918 .BR pwrite (2)
922 Blackfin (port removed in Linux 4.17)
924 .PD 0
925 .IP * 2
926 .BR bfin_spinlock (2)
927 (added in Linux 2.6.22)
928 .IP *
929 .BR dma_memcpy (2)
930 (added in Linux 2.6.22)
931 .IP *
932 .BR pread (2)
933 (added in Linux 2.6.22)
934 .IP *
935 .BR pwrite (2)
936 (added in Linux 2.6.22)
937 .IP *
938 .BR sram_alloc (2)
939 (added in Linux 2.6.22)
940 .IP *
941 .BR sram_free (2)
942 (added in Linux 2.6.22)
946 Metag (port removed in Linux 4.17)
948 .PD 0
949 .IP * 2
950 .BR metag_get_tls (2)
951 (add in Linux 3.9)
952 .IP *
953 .BR metag_set_fpu_flags (2)
954 (add in Linux 3.9)
955 .IP *
956 .BR metag_set_tls (2)
957 (add in Linux 3.9)
958 .IP *
959 .BR metag_setglobalbit (2)
960 (add in Linux 3.9)
964 Tile (port removed in Linux 4.17)
966 .PD 0
967 .IP * 2
968 .BR cmpxchg_badaddr (2)
969 (added in Linux 2.6.36)
972 .SH NOTES
973 Roughly speaking, the code belonging to the system call
974 with number __NR_xxx defined in
975 .I /usr/include/asm/unistd.h
976 can be found in the Linux kernel source in the routine
977 .IR sys_xxx ().
978 There are many exceptions, however, mostly because
979 older system calls were superseded by newer ones,
980 and this has been treated somewhat unsystematically.
981 On platforms with
982 proprietary operating-system emulation,
983 such as sparc, sparc64, and alpha,
984 there are many additional system calls; mips64 also contains a full
985 set of 32-bit system calls.
987 Over time, changes to the interfaces of some system calls have been
988 necessary.
989 One reason for such changes was the need to increase the size of
990 structures or scalar values passed to the system call.
991 Because of these changes, certain architectures
992 (notably, longstanding 32-bit architectures such as i386)
993 now have various groups of related system calls (e.g.,
994 .BR truncate (2)
996 .BR truncate64 (2))
997 which perform similar tasks, but which vary in
998 details such as the size of their arguments.
999 (As noted earlier, applications are generally unaware of this:
1000 the glibc wrapper functions do some work to ensure that the right
1001 system call is invoked, and that ABI compatibility is
1002 preserved for old binaries.)
1003 Examples of systems calls that exist in multiple versions are
1004 the following:
1005 .IP * 3
1006 By now there are three different versions of
1007 .BR stat (2):
1008 .IR sys_stat ()
1009 (slot
1010 .IR __NR_oldstat ),
1011 .IR sys_newstat ()
1012 (slot
1013 .IR __NR_stat ),
1015 .IR sys_stat64 ()
1016 (slot
1017 .IR __NR_stat64 ),
1018 with the last being the most current.
1019 .\" e.g., on 2.6.22/i386: __NR_oldstat 18, __NR_stat 106, __NR_stat64 195
1020 .\" The stat system calls deal with three different data structures,
1021 .\" defined in include/asm-i386/stat.h: __old_kernel_stat, stat, stat64
1022 A similar story applies for
1023 .BR lstat (2)
1025 .BR fstat (2).
1026 .IP *
1027 Similarly, the defines
1028 .IR __NR_oldolduname ,
1029 .IR __NR_olduname ,
1031 .I __NR_uname
1032 refer to the routines
1033 .IR sys_olduname (),
1034 .IR sys_uname (),
1036 .IR sys_newuname ().
1037 .IP *
1038 In Linux 2.0, a new version of
1039 .BR vm86 (2)
1040 appeared, with the old and the new kernel routines being named
1041 .IR sys_vm86old ()
1043 .IR sys_vm86 ().
1044 .IP *
1045 In Linux 2.4, a new version of
1046 .BR getrlimit (2)
1047 appeared, with the old and the new kernel routines being named
1048 .IR sys_old_getrlimit ()
1049 (slot
1050 .IR __NR_getrlimit )
1052 .IR sys_getrlimit ()
1053 (slot
1054 .IR __NR_ugetrlimit ).
1055 .IP *
1056 Linux 2.4 increased the size of user and group IDs from 16 to 32 bits.
1057 .\" 64-bit off_t changes: ftruncate64, *stat64,
1058 .\" fcntl64 (because of the flock structure), getdents64, *statfs64
1059 To support this change, a range of system calls were added
1060 (e.g.,
1061 .BR chown32 (2),
1062 .BR getuid32 (2),
1063 .BR getgroups32 (2),
1064 .BR setresuid32 (2)),
1065 superseding earlier calls of the same name without the
1066 "32" suffix.
1067 .IP *
1068 Linux 2.4 added support for applications on 32-bit architectures
1069 to access large files (i.e., files for which the sizes and
1070 file offsets can't be represented in 32 bits.)
1071 To support this change, replacements were required for system calls
1072 that deal with file offsets and sizes.
1073 Thus the following system calls were added:
1074 .BR fcntl64 (2),
1075 .BR getdents64 (2),
1076 .BR stat64 (2),
1077 .BR statfs64 (2),
1078 .BR truncate64 (2),
1079 and their analogs that work with file descriptors or
1080 symbolic links.
1081 These system calls supersede the older system calls
1082 which, except in the case of the "stat" calls,
1083 have the same name without the "64" suffix.
1085 On newer platforms that only have 64-bit file access and 32-bit UIDs/GIDs
1086 (e.g., alpha, ia64, s390x, x86-64), there is just a single version of
1087 the UID/GID and file access system calls.
1088 On platforms (typically, 32-bit platforms) where the *64 and *32 calls exist,
1089 the other versions are obsolete.
1090 .IP *
1092 .I rt_sig*
1093 calls were added in kernel 2.2 to support the addition
1094 of real-time signals (see
1095 .BR signal (7)).
1096 These system calls supersede the older system calls of the same
1097 name without the "rt_" prefix.
1098 .IP *
1100 .BR select (2)
1102 .BR mmap (2)
1103 system calls use five or more arguments,
1104 which caused problems in the way
1105 argument passing on the i386 used to be set up.
1106 Thus, while other architectures have
1107 .IR sys_select ()
1109 .IR sys_mmap ()
1110 corresponding to
1111 .I __NR_select
1113 .IR __NR_mmap ,
1114 on i386 one finds
1115 .IR old_select ()
1117 .IR old_mmap ()
1118 (routines that use a pointer to an
1119 argument block) instead.
1120 These days passing five arguments
1121 is not a problem any more, and there is a
1122 .I __NR__newselect
1123 .\" (used by libc 6)
1124 that corresponds directly to
1125 .IR sys_select ()
1126 and similarly
1127 .IR __NR_mmap2 .
1128 s390x is the only 64-bit architecture that has
1129 .IR old_mmap ().
1130 .\" .PP
1131 .\" Two system call numbers,
1132 .\" .IR __NR__llseek
1133 .\" and
1134 .\" .IR __NR__sysctl
1135 .\" have an additional underscore absent in
1136 .\" .IR sys_llseek ()
1137 .\" and
1138 .\" .IR sys_sysctl ().
1140 .\" In kernel 2.1.81,
1141 .\" .BR lchown (2)
1142 .\" and
1143 .\" .BR chown (2)
1144 .\" were swapped; that is,
1145 .\" .BR lchown (2)
1146 .\" was added with the semantics that were then current for
1147 .\" .BR chown (2),
1148 .\" and the semantics of the latter call were changed to what
1149 .\" they are today.
1152 .SS "Architecture-specific details: Alpha"
1153 .IP * 3
1154 .BR getxgid (2)
1155 returns a pair of GID and effective GID via registers
1156 \fBr0\fP and \fBr20\fP; it is provided
1157 instead of
1158 \fBgetgid\fP(2) and \fBgetegid\fP(2).
1159 .IP *
1160 .BR getxpid (2)
1161 returns a pair of PID and parent PID via registers
1162 \fBr0\fP and \fBr20\fP; it is provided instead of
1163 \fBgetpid\fP(2) and \fBgetppid\fP(2).
1164 .IP *
1165 .BR old_adjtimex (2)
1166 is a variant of \fBadjtimex\fP(2) that uses \fIstruct timeval32\fP,
1167 for compatibility with OSF/1.
1168 .IP *
1169 .BR getxuid (2)
1170 returns a pair of GID and effective GID via registers
1171 \fBr0\fP and \fBr20\fP; it is provided instead of
1172 \fBgetuid\fP(2) and \fBgeteuid\fP(2).
1173 .IP *
1174 .BR sethae (2)
1175 is used for configuring the Host Address Extension register on
1176 low-cost Alphas in order to access address space beyond first 27 bits.
1177 .SH SEE ALSO
1178 .BR ausyscall (1)
1179 .BR intro (2),
1180 .BR syscall (2),
1181 .BR unimplemented (2),
1182 .BR errno (3),
1183 .BR libc (7),
1184 .BR vdso (7)