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