Debian Codegraph @

upstream/fedora-44/man2/syscalls.2

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