]>
Commit | Line | Data |
---|---|---|
c11b1abf | 1 | .\" Copyright (C) 2007 Michael Kerrisk <mtk.manpages@gmail.com> |
09de4bf1 MK |
2 | .\" with some input from Stepan Kasal <kasal@ucw.cz> |
3 | .\" | |
4 | .\" Some content retained from an earlier version of this page: | |
fea681da MK |
5 | .\" Copyright (C) 1998 Andries Brouwer (aeb@cwi.nl) |
6 | .\" Modifications for 2.2 and 2.4 Copyright (C) 2002 Ian Redfern | |
7 | .\" <redferni@logica.com> | |
8 | .\" | |
93015253 | 9 | .\" %%%LICENSE_START(VERBATIM) |
fea681da MK |
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. | |
4b72fb64 | 29 | .\" %%%LICENSE_END |
fea681da | 30 | .\" |
1e64c86b | 31 | .TH SYSCALLS 2 2015-03-29 "Linux" "Linux Programmer's Manual" |
fea681da | 32 | .SH NAME |
09de4bf1 | 33 | syscalls \- Linux system calls |
fea681da | 34 | .SH SYNOPSIS |
09de4bf1 | 35 | Linux system calls. |
fea681da MK |
36 | .SH DESCRIPTION |
37 | The system call is the fundamental interface between an application | |
c13182ef | 38 | and the Linux kernel. |
7d50a840 MK |
39 | .SS System calls and library wrapper functions |
40 | System calls are generally not invoked directly, | |
61d7d93c MK |
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). | |
7d50a840 MK |
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 truncate () | |
48 | which invokes the underlying "truncate" system call. | |
fea681da | 49 | |
7d50a840 | 50 | Often the glibc wrapper function is quite thin, doing little work |
c8bd05f9 MK |
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; | |
62 | when this happens, | |
63 | the wrapper function negates the returned error number | |
64 | (to make it positive), copies it to | |
65 | .IR errno , | |
66 | and returns \-1 to the caller of the wrapper. | |
7d50a840 MK |
67 | |
68 | Sometimes, however, the wrapper function does some extra work | |
69 | before invoking the system call. | |
70 | For example, nowadays there are (for reasons described below) two | |
71 | related system calls, | |
72 | .BR truncate (2) | |
73 | and | |
74 | .BR truncate64 (2), | |
75 | and the glibc | |
76 | .BR truncate () | |
61d7d93c MK |
77 | wrapper function checks which of those system calls |
78 | are provided by the kernel and determines which should be employed. | |
7d50a840 | 79 | .SS System call list |
1ce7088e | 80 | Below is a list of the Linux system calls. |
09de4bf1 MK |
81 | In the list, the |
82 | .I Kernel | |
83 | column indicates the kernel version | |
84 | for those system calls that were new in Linux 2.2, | |
85 | or have appeared since that kernel version. | |
86 | Note the following points: | |
87 | .IP * 3 | |
88 | Where no kernel version is indicated, | |
dc2f5549 MK |
89 | the system call appeared in kernel 1.0 or earlier. |
90 | .IP * | |
91 | Where a system call is marked "1.2" | |
92 | this means the system call probably appeared in a 1.1.x kernel version, | |
93 | and first appeared in a stable kernel with 1.2. | |
94 | (Development of the 1.2 kernel was initiated from a branch of kernel | |
95 | 1.0.6 via the 1.1.x unstable kernel series.) | |
96 | .IP * | |
97 | Where a system call is marked "2.0" | |
98 | this means the system call probably appeared in a 1.3.x kernel version, | |
99 | and first appeared in a stable kernel with 2.0. | |
100 | (Development of the 2.0 kernel was initiated from a branch of kernel | |
101 | 1.2.x, somewhere around 1.2.10, | |
102 | via the 1.3.x unstable kernel series.) | |
d6ce4960 MK |
103 | .\" Was kernel 2.0 started from a branch of 1.2.10? |
104 | .\" At least from the timestamps of the tarballs of | |
105 | .\" of 1.2.10 and 1.3.0, that's how it looks, but in | |
e0bf9127 | 106 | .\" fact the diff doesn't seem very clear, the |
d6ce4960 MK |
107 | .\" 1.3.0 .tar.bz is much bigger (2.0 MB) than the |
108 | .\" 1.2.10 .tar.bz2 (1.8 MB), and AEB points out the | |
109 | .\" timestamps of some files in 1.3.0 seem to be older | |
110 | .\" than those in 1.2.10. All of this suggests | |
111 | .\" that there might not have been a clean branch point. | |
09de4bf1 MK |
112 | .IP * |
113 | Where a system call is marked "2.2" | |
114 | this means the system call probably appeared in a 2.1.x kernel version, | |
115 | and first appeared in a stable kernel with 2.2.0. | |
f9e4d811 MK |
116 | (Development of the 2.2 kernel was initiated from a branch of kernel |
117 | 2.0.21 via the 2.1.x unstable kernel series.) | |
09de4bf1 MK |
118 | .IP * |
119 | Where a system call is marked "2.4" | |
120 | this means the system call probably appeared in a 2.3.x kernel version, | |
121 | and first appeared in a stable kernel with 2.4.0. | |
f9e4d811 MK |
122 | (Development of the 2.4 kernel was initiated from a branch of |
123 | kernel 2.2.8 via the 2.3.x unstable kernel series.) | |
09de4bf1 MK |
124 | .IP * |
125 | Where a system call is marked "2.6" | |
126 | this means the system call probably appeared in a 2.5.x kernel version, | |
127 | and first appeared in a stable kernel with 2.6.0. | |
f9e4d811 MK |
128 | (Development of kernel 2.6 was initiated from a branch |
129 | of kernel 2.4.15 via the 2.5.x unstable kernel series.) | |
09de4bf1 MK |
130 | .IP * |
131 | Starting with kernel 2.6.0, the development model changed, | |
132 | and new system calls may appear in each 2.6.x release. | |
f9e4d811 MK |
133 | In this case, the exact version number where the system call appeared |
134 | is shown. | |
c39f51b0 | 135 | This convention continues with the 3.x kernel series, |
9316cc64 MK |
136 | which followed on from kernel 2.6.39, and the 4.x kernel series, |
137 | which followed on from kernel 3.19. | |
f9e4d811 MK |
138 | .IP * |
139 | In some cases, a system call was added to a stable kernel | |
140 | series after it branched from the previous stable kernel | |
141 | series, and then backported into the earlier stable kernel series. | |
142 | For example some system calls that appeared in 2.6.x were also backported | |
143 | into a 2.4.x release after 2.4.15. | |
144 | When this is so, the version where the system call appeared | |
09de4bf1 | 145 | in both of the major kernel series is listed. |
09de4bf1 | 146 | .PP |
b5fe4c49 | 147 | The list of system calls that are available as at kernel 4.3 |
09de4bf1 MK |
148 | (or in a few cases only on older kernels) is as follows: |
149 | .\" | |
150 | .\" Looking at scripts/checksyscalls.sh in the kernel source is | |
929f1ff7 | 151 | .\" instructive about x86 specifics. |
09de4bf1 | 152 | .\" |
56f2caff | 153 | .ad l |
09de4bf1 | 154 | .TS |
dc0fac14 | 155 | l2 le l |
7d50a840 | 156 | --- |
09de4bf1 | 157 | l l l. |
e2f9e1be | 158 | \fBSystem call\fP \fBKernel\fP \fBNotes\fP |
3fffa7b6 | 159 | |
dc2f5549 | 160 | \fB_llseek\fP(2) 1.2 |
8717e79e MK |
161 | \fB_newselect\fP(2) 2.0 |
162 | \fB_sysctl\fP(2) 2.0 | |
163 | \fBaccept\fP(2) 2.0 See notes on \fBsocketcall\fP(2) | |
53e819d0 | 164 | \fBaccept4\fP(2) 2.6.28 |
8717e79e MK |
165 | \fBaccess\fP(2) 1.0 |
166 | \fBacct\fP(2) 1.0 | |
09de4bf1 | 167 | \fBadd_key\fP(2) 2.6.11 |
8717e79e MK |
168 | \fBadjtimex\fP(2) 1.0 |
169 | \fBalarm\fP(2) 1.0 | |
f9e4d811 | 170 | \fBalloc_hugepages\fP(2) 2.5.36 Removed in 2.5.44 |
8717e79e | 171 | \fBbdflush\fP(2) 1.2 T{ |
b6bc918e MK |
172 | Deprecated (does nothing) |
173 | .br | |
174 | since 2.6 | |
56f2caff | 175 | T} |
8717e79e | 176 | \fBbind\fP(2) 2.0 See notes on \fBsocketcall\fP(2) |
a3708b57 | 177 | \fBbpf\fP(2) 3.18 |
8717e79e | 178 | \fBbrk\fP(2) 1.0 |
929f1ff7 | 179 | \fBcacheflush\fP(2) 1.2 Not on x86 |
09de4bf1 MK |
180 | \fBcapget\fP(2) 2.2 |
181 | \fBcapset\fP(2) 2.2 | |
8717e79e MK |
182 | \fBchdir\fP(2) 1.0 |
183 | \fBchmod\fP(2) 1.0 | |
184 | \fBchown\fP(2) 2.2 T{ | |
b6bc918e MK |
185 | See \fBchown\fP(2) for |
186 | .br | |
187 | version details | |
8717e79e | 188 | T} |
09de4bf1 | 189 | \fBchown32\fP(2) 2.4 |
8717e79e | 190 | \fBchroot\fP(2) 1.0 |
b9cad55b | 191 | \fBclock_adjtime\fP(2) 2.6.39 |
09de4bf1 MK |
192 | \fBclock_getres\fP(2) 2.6 |
193 | \fBclock_gettime\fP(2) 2.6 | |
194 | \fBclock_nanosleep\fP(2) 2.6 | |
195 | \fBclock_settime\fP(2) 2.6 | |
8717e79e MK |
196 | \fBclone\fP(2) 1.0 |
197 | \fBclose\fP(2) 1.0 | |
198 | \fBconnect\fP(2) 2.0 See notes on \fBsocketcall\fP(2) | |
199 | \fBcreat\fP(2) 1.0 | |
a0bd8202 | 200 | \fBcreate_module\fP(2) 1.0 Removed in 2.6 |
8717e79e MK |
201 | \fBdelete_module\fP(2) 1.0 |
202 | \fBdup\fP(2) 1.0 | |
203 | \fBdup2\fP(2) 1.0 | |
eb153420 | 204 | \fBdup3\fP(2) 2.6.27 |
09de4bf1 | 205 | \fBepoll_create\fP(2) 2.6 |
eb153420 | 206 | \fBepoll_create1\fP(2) 2.6.27 |
09de4bf1 MK |
207 | \fBepoll_ctl\fP(2) 2.6 |
208 | \fBepoll_pwait\fP(2) 2.6.19 | |
209 | \fBepoll_wait\fP(2) 2.6 | |
210 | \fBeventfd\fP(2) 2.6.22 | |
eb153420 | 211 | \fBeventfd2\fP(2) 2.6.27 |
8717e79e | 212 | \fBexecve\fP(2) 1.0 |
7c244c53 | 213 | \fBexecveat\fP(2) 3.19 |
8717e79e | 214 | \fBexit\fP(2) 1.0 |
30fa088c | 215 | \fBexit_group\fP(2) 2.6 |
09de4bf1 | 216 | \fBfaccessat\fP(2) 2.6.16 |
7d50a840 MK |
217 | \fBfadvise64\fP(2) 2.6 |
218 | .\" Implements \fBposix_fadvise\fP(2) | |
219 | \fBfadvise64_64\fP(2) 2.6 | |
6397da8c | 220 | \fBfallocate\fP(2) 2.6.23 |
3610ae93 MK |
221 | \fBfanotify_init\fP(2) 2.6.37 |
222 | \fBfanotify_mark\fP(2) 2.6.37 | |
223 | .\" The fanotify calls were added in Linux 2.6.36, | |
224 | .\" but disabled while the API was finalized. | |
8717e79e MK |
225 | \fBfchdir\fP(2) 1.0 |
226 | \fBfchmod\fP(2) 1.0 | |
09de4bf1 | 227 | \fBfchmodat\fP(2) 2.6.16 |
8717e79e | 228 | \fBfchown\fP(2) 1.0 |
09de4bf1 MK |
229 | \fBfchown32\fP(2) 2.4 |
230 | \fBfchownat\fP(2) 2.6.16 | |
8717e79e | 231 | \fBfcntl\fP(2) 1.0 |
09de4bf1 | 232 | \fBfcntl64\fP(2) 2.4 |
8717e79e | 233 | \fBfdatasync\fP(2) 2.0 |
09de4bf1 | 234 | \fBfgetxattr\fP(2) 2.6; 2.4.18 |
ecbb4bb7 | 235 | \fBfinit_module\fP(2) 3.8 |
09de4bf1 | 236 | \fBflistxattr\fP(2) 2.6; 2.4.18 |
dc2f5549 | 237 | \fBflock\fP(2) 2.0 |
8717e79e | 238 | \fBfork\fP(2) 1.0 |
f9e4d811 | 239 | \fBfree_hugepages\fP(2) 2.5.36 Removed in 2.5.44 |
09de4bf1 MK |
240 | \fBfremovexattr\fP(2) 2.6; 2.4.18 |
241 | \fBfsetxattr\fP(2) 2.6; 2.4.18 | |
8717e79e | 242 | \fBfstat\fP(2) 1.0 |
09de4bf1 | 243 | \fBfstat64\fP(2) 2.4 |
f6b8bc07 | 244 | \fBfstatat64\fP(2) 2.6.16 |
8717e79e | 245 | \fBfstatfs\fP(2) 1.0 |
09de4bf1 | 246 | \fBfstatfs64\fP(2) 2.6 |
aeddd876 | 247 | \fBfsync\fP(2) 1.0 |
8717e79e | 248 | \fBftruncate\fP(2) 1.0 |
09de4bf1 | 249 | \fBftruncate64\fP(2) 2.4 |
30fa088c | 250 | \fBfutex\fP(2) 2.6 |
09de4bf1 | 251 | \fBfutimesat\fP(2) 2.6.16 |
4c68ac9e | 252 | \fBget_kernel_syms\fP(2) 1.0 Removed in 2.6 |
09de4bf1 MK |
253 | \fBget_mempolicy\fP(2) 2.6.6 |
254 | \fBget_robust_list\fP(2) 2.6.17 | |
30fa088c | 255 | \fBget_thread_area\fP(2) 2.6 |
09de4bf1 MK |
256 | \fBgetcpu\fP(2) 2.6.19 |
257 | \fBgetcwd\fP(2) 2.2 | |
dc2f5549 | 258 | \fBgetdents\fP(2) 2.0 |
09de4bf1 | 259 | \fBgetdents64\fP(2) 2.4 |
8717e79e | 260 | \fBgetegid\fP(2) 1.0 |
09de4bf1 | 261 | \fBgetegid32\fP(2) 2.4 |
8717e79e | 262 | \fBgeteuid\fP(2) 1.0 |
09de4bf1 | 263 | \fBgeteuid32\fP(2) 2.4 |
8717e79e | 264 | \fBgetgid\fP(2) 1.0 |
09de4bf1 | 265 | \fBgetgid32\fP(2) 2.4 |
8717e79e | 266 | \fBgetgroups\fP(2) 1.0 |
09de4bf1 | 267 | \fBgetgroups32\fP(2) 2.4 |
8717e79e MK |
268 | \fBgetitimer\fP(2) 1.0 |
269 | \fBgetpeername\fP(2) 2.0 See notes on \fBsocketcall\fP(2) | |
929f1ff7 | 270 | \fBgetpagesize\fP(2) 2.0 Not on x86 |
8717e79e MK |
271 | \fBgetpgid\fP(2) 1.0 |
272 | \fBgetpgrp\fP(2) 1.0 | |
273 | \fBgetpid\fP(2) 1.0 | |
274 | \fBgetppid\fP(2) 1.0 | |
275 | \fBgetpriority\fP(2) 1.0 | |
1d94912f | 276 | \fBgetrandom\fP(2) 3.17 |
09de4bf1 MK |
277 | \fBgetresgid\fP(2) 2.2 |
278 | \fBgetresgid32\fP(2) 2.4 | |
279 | \fBgetresuid\fP(2) 2.2 | |
280 | \fBgetresuid32\fP(2) 2.4 | |
8717e79e MK |
281 | \fBgetrlimit\fP(2) 1.0 |
282 | \fBgetrusage\fP(2) 1.0 | |
dc2f5549 | 283 | \fBgetsid\fP(2) 2.0 |
8717e79e MK |
284 | \fBgetsockname\fP(2) 2.0 See notes on \fBsocketcall\fP(2) |
285 | \fBgetsockopt\fP(2) 2.0 See notes on \fBsocketcall\fP(2) | |
09de4bf1 | 286 | \fBgettid\fP(2) 2.4.11 |
8717e79e MK |
287 | \fBgettimeofday\fP(2) 1.0 |
288 | \fBgetuid\fP(2) 1.0 | |
09de4bf1 | 289 | \fBgetuid32\fP(2) 2.4 |
018991f6 | 290 | .\" \fBgetunwind\fP(2) 2.4.8 ia64; DEPRECATED |
09de4bf1 | 291 | \fBgetxattr\fP(2) 2.6; 2.4.18 |
8717e79e | 292 | \fBinit_module\fP(2) 1.0 |
09de4bf1 MK |
293 | \fBinotify_add_watch\fP(2) 2.6.13 |
294 | \fBinotify_init\fP(2) 2.6.13 | |
eb153420 | 295 | \fBinotify_init1\fP(2) 2.6.27 |
09de4bf1 | 296 | \fBinotify_rm_watch\fP(2) 2.6.13 |
30fa088c MK |
297 | \fBio_cancel\fP(2) 2.6 |
298 | \fBio_destroy\fP(2) 2.6 | |
299 | \fBio_getevents\fP(2) 2.6 | |
300 | \fBio_setup\fP(2) 2.6 | |
301 | \fBio_submit\fP(2) 2.6 | |
8717e79e MK |
302 | \fBioctl\fP(2) 1.0 |
303 | \fBioperm\fP(2) 1.0 | |
304 | \fBiopl\fP(2) 1.0 | |
09de4bf1 MK |
305 | \fBioprio_get\fP(2) 2.6.13 |
306 | \fBioprio_set\fP(2) 2.6.13 | |
8717e79e | 307 | \fBipc\fP(2) 1.0 |
7d50a840 | 308 | .\" Implements System V IPC calls |
8eec4a23 | 309 | \fBkcmp\fP(2) 3.5 |
29cb9035 | 310 | \fBkern_features\fP(2) 3.7 Sparc64 |
bea08fec | 311 | .\" FIXME . document kern_features(): |
38291c52 | 312 | .\" commit 517ffce4e1a03aea979fe3a18a3dd1761a24fafb |
1d94912f | 313 | \fBkexec_file_load\fP(2) 3.17 |
3ed3a507 MK |
314 | \fBkexec_load\fP(2) 2.6.13 |
315 | .\" The entry in the syscall table was reserved starting in 2.6.7 | |
7d50a840 | 316 | .\" Was named sys_kexec_load() from 2.6.7 to 2.6.16 |
09de4bf1 | 317 | \fBkeyctl\fP(2) 2.6.11 |
8717e79e MK |
318 | \fBkill\fP(2) 1.0 |
319 | \fBlchown\fP(2) 1.0 T{ | |
b6bc918e MK |
320 | See \fBchown\fP(2) for |
321 | .br | |
322 | version details | |
8717e79e | 323 | T} |
09de4bf1 MK |
324 | \fBlchown32\fP(2) 2.4 |
325 | \fBlgetxattr\fP(2) 2.6; 2.4.18 | |
8717e79e | 326 | \fBlink\fP(2) 1.0 |
09de4bf1 | 327 | \fBlinkat\fP(2) 2.6.16 |
8717e79e | 328 | \fBlisten\fP(2) 2.0 See notes on \fBsocketcall\fP(2) |
09de4bf1 MK |
329 | \fBlistxattr\fP(2) 2.6; 2.4.18 |
330 | \fBllistxattr\fP(2) 2.6; 2.4.18 | |
09de4bf1 MK |
331 | \fBlookup_dcookie\fP(2) 2.6 |
332 | \fBlremovexattr\fP(2) 2.6; 2.4.18 | |
8717e79e | 333 | \fBlseek\fP(2) 1.0 |
09de4bf1 | 334 | \fBlsetxattr\fP(2) 2.6; 2.4.18 |
8717e79e | 335 | \fBlstat\fP(2) 1.0 |
09de4bf1 MK |
336 | \fBlstat64\fP(2) 2.4 |
337 | \fBmadvise\fP(2) 2.4 | |
09de4bf1 MK |
338 | \fBmbind\fP(2) 2.6.6 |
339 | .\" \fBmemory_ordering\fP(2) ??? Sparc64 | |
1d94912f | 340 | \fBmemfd_create\fP(2) 3.17 |
09de4bf1 MK |
341 | \fBmigrate_pages\fP(2) 2.6.16 |
342 | \fBmincore\fP(2) 2.4 | |
8717e79e | 343 | \fBmkdir\fP(2) 1.0 |
09de4bf1 | 344 | \fBmkdirat\fP(2) 2.6.16 |
8717e79e | 345 | \fBmknod\fP(2) 1.0 |
09de4bf1 | 346 | \fBmknodat\fP(2) 2.6.16 |
8717e79e MK |
347 | \fBmlock\fP(2) 2.0 |
348 | \fBmlockall\fP(2) 2.0 | |
349 | \fBmmap\fP(2) 1.0 | |
09de4bf1 | 350 | \fBmmap2\fP(2) 2.4 |
8717e79e MK |
351 | \fBmodify_ldt\fP(2) 1.0 |
352 | \fBmount\fP(2) 1.0 | |
09de4bf1 | 353 | \fBmove_pages\fP(2) 2.6.18 |
8717e79e | 354 | \fBmprotect\fP(2) 1.0 |
7d50a840 MK |
355 | \fBmq_getsetattr\fP(2) 2.6.6 |
356 | .\" Implements \fBmq_getattr\fP(3) and \fBmq_setattr\fP(3) | |
09de4bf1 MK |
357 | \fBmq_notify\fP(2) 2.6.6 |
358 | \fBmq_open\fP(2) 2.6.6 | |
359 | \fBmq_timedreceive\fP(2) 2.6.6 | |
360 | \fBmq_timedsend\fP(2) 2.6.6 | |
8717e79e | 361 | \fBmq_unlink\fP(2) 2.6.6 |
dc2f5549 | 362 | \fBmremap\fP(2) 2.0 |
8717e79e MK |
363 | \fBmsgctl\fP(2) 2.0 See notes on \fBipc\fP(2) |
364 | \fBmsgget\fP(2) 2.0 See notes on \fBipc\fP(2) | |
365 | \fBmsgrcv\fP(2) 2.0 See notes on \fBipc\fP(2) | |
366 | \fBmsgsnd\fP(2) 2.0 See notes on \fBipc\fP(2) | |
dc2f5549 | 367 | \fBmsync\fP(2) 2.0 |
af4c9a82 MK |
368 | .\" \fBmultiplexer\fP(2) ?? __NR_multiplexer reserved on |
369 | .\" PowerPC, but unimplemented? | |
8717e79e MK |
370 | \fBmunlock\fP(2) 2.0 |
371 | \fBmunlockall\fP(2) 2.0 | |
372 | \fBmunmap\fP(2) 1.0 | |
b9cad55b | 373 | \fBname_to_handle_at\fP(2) 2.6.39 |
dc2f5549 | 374 | \fBnanosleep\fP(2) 2.0 |
18a97acf | 375 | \fBnfsservctl\fP(2) 2.2 Removed in 3.1 |
8717e79e MK |
376 | \fBnice\fP(2) 1.0 |
377 | \fBoldfstat\fP(2) 1.0 | |
378 | \fBoldlstat\fP(2) 1.0 | |
379 | \fBoldolduname\fP(2) 1.0 | |
380 | \fBoldstat\fP(2) 1.0 | |
381 | \fBolduname\fP(2) 1.0 | |
382 | \fBopen\fP(2) 1.0 | |
b9cad55b | 383 | \fBopen_by_handle_at\fP(2) 2.6.39 |
09de4bf1 | 384 | \fBopenat\fP(2) 2.6.16 |
8717e79e | 385 | \fBpause\fP(2) 1.0 |
929f1ff7 MK |
386 | \fBpciconfig_iobase\fP(2) 2.2.15; 2.4 Not on x86 |
387 | .\" Alpha, PowerPC, ARM; not x86 | |
388 | \fBpciconfig_read\fP(2) 2.0.26; 2.2 Not on x86 | |
389 | .\" , PowerPC, ARM; not x86 | |
390 | \fBpciconfig_write\fP(2) 2.0.26; 2.2 Not on x86 | |
391 | .\" , PowerPC, ARM; not x86 | |
56f2caff | 392 | \fBperf_event_open\fP(2) 2.6.31 T{ |
dc0fac14 | 393 | Was perf_counter_open() in |
b6bc918e | 394 | .br |
dc0fac14 | 395 | 2.6.31; renamed in 2.6.32 |
56f2caff | 396 | T} |
dc2f5549 | 397 | \fBpersonality\fP(2) 1.2 |
7ddff6a4 MK |
398 | \fBperfctr\fP(2) 2.2 Sparc; removed in 2.6.34 |
399 | .\" commit c7d5a0050773e98d1094eaa9f2a1a793fafac300 removed perfctr() | |
3d1761ac | 400 | \fBperfmonctl\fP(2) 2.4 ia64 |
8717e79e | 401 | \fBpipe\fP(2) 1.0 |
eb153420 | 402 | \fBpipe2\fP(2) 2.6.27 |
dc2f5549 | 403 | \fBpivot_root\fP(2) 2.4 |
8717e79e | 404 | \fBpoll\fP(2) 2.0.36; 2.2 |
9fd8b7fd | 405 | \fBppc_rtas\fP(2) 2.6.2 PowerPC only |
09de4bf1 MK |
406 | \fBppoll\fP(2) 2.6.16 |
407 | \fBprctl\fP(2) 2.2 | |
56f2caff | 408 | \fBpread64\fP(2) T{ |
b6bc918e MK |
409 | Added as "pread" in 2.2; |
410 | .br | |
411 | renamed "pread64" in 2.6 | |
56f2caff | 412 | T} |
0877a26b | 413 | \fBpreadv\fP(2) 2.6.30 |
7b08c45b | 414 | \fBprlimit64\fP(2) 2.6.36 |
f06f5014 DP |
415 | \fBprocess_vm_readv\fP(2) 3.2 |
416 | \fBprocess_vm_writev\fP(2) 3.2 | |
7d50a840 MK |
417 | \fBpselect6\fP(2) 2.6.16 |
418 | .\" Implements \fBpselect\fP(2) | |
8717e79e | 419 | \fBptrace\fP(2) 1.0 |
56f2caff | 420 | \fBpwrite64\fP(2) T{ |
b6bc918e MK |
421 | Added as "pwrite" in 2.2; |
422 | .br | |
423 | renamed "pwrite64" in 2.6 | |
56f2caff | 424 | T} |
0877a26b | 425 | \fBpwritev\fP(2) 2.6.30 |
13f66890 | 426 | \fBquery_module\fP(2) 2.2 Removed in 2.6 |
8717e79e MK |
427 | \fBquotactl\fP(2) 1.0 |
428 | \fBread\fP(2) 1.0 | |
09de4bf1 | 429 | \fBreadahead\fP(2) 2.4.13 |
8717e79e | 430 | \fBreaddir\fP(2) 1.0 |
7d50a840 | 431 | .\" Supersedes \fBgetdents\fP(2) |
8717e79e | 432 | \fBreadlink\fP(2) 1.0 |
09de4bf1 | 433 | \fBreadlinkat\fP(2) 2.6.16 |
dc2f5549 | 434 | \fBreadv\fP(2) 2.0 |
8717e79e MK |
435 | \fBreboot\fP(2) 1.0 |
436 | \fBrecv\fP(2) 2.0 See notes on \fBsocketcall\fP(2) | |
437 | \fBrecvfrom\fP(2) 2.0 See notes on \fBsocketcall\fP(2) | |
438 | \fBrecvmsg\fP(2) 2.0 See notes on \fBsocketcall\fP(2) | |
285bf67e | 439 | \fBrecvmmsg\fP(2) 2.6.33 |
b665034d | 440 | \fBremap_file_pages\fP(2) 2.6 Deprecated since 3.16 |
09de4bf1 | 441 | \fBremovexattr\fP(2) 2.6; 2.4.18 |
8717e79e | 442 | \fBrename\fP(2) 1.0 |
09de4bf1 | 443 | \fBrenameat\fP(2) 2.6.16 |
bf253d9b | 444 | \fBrenameat2\fP(2) 3.15 |
09de4bf1 MK |
445 | \fBrequest_key\fP(2) 2.6.11 |
446 | \fBrestart_syscall\fP(2) 2.6 | |
8717e79e | 447 | \fBrmdir\fP(2) 1.0 |
09de4bf1 MK |
448 | \fBrt_sigaction\fP(2) 2.2 |
449 | \fBrt_sigpending\fP(2) 2.2 | |
450 | \fBrt_sigprocmask\fP(2) 2.2 | |
7d50a840 | 451 | \fBrt_sigqueueinfo\fP(2) 2.2 |
09de4bf1 MK |
452 | \fBrt_sigreturn\fP(2) 2.2 |
453 | \fBrt_sigsuspend\fP(2) 2.2 | |
454 | \fBrt_sigtimedwait\fP(2) 2.2 | |
285bf67e | 455 | \fBrt_tgsigqueueinfo\fP(2) 2.6.31 |
993d1ce3 | 456 | \fBs390_runtime_instr\fP(2) 3.7 s390 only |
80a74083 MK |
457 | \fBs390_pci_mmio_read\fP(2) 3.19 s390 only |
458 | \fBs390_pci_mmio_write\fP(2) 3.19 s390 only | |
dc2f5549 MK |
459 | \fBsched_get_priority_max\fP(2) 2.0 |
460 | \fBsched_get_priority_min\fP(2) 2.0 | |
30fa088c | 461 | \fBsched_getaffinity\fP(2) 2.6 |
70415818 | 462 | \fBsched_getattr\fP(2) 3.14 |
dc2f5549 MK |
463 | \fBsched_getparam\fP(2) 2.0 |
464 | \fBsched_getscheduler\fP(2) 2.0 | |
465 | \fBsched_rr_get_interval\fP(2) 2.0 | |
30fa088c | 466 | \fBsched_setaffinity\fP(2) 2.6 |
70415818 | 467 | \fBsched_setattr\fP(2) 3.14 |
dc2f5549 MK |
468 | \fBsched_setparam\fP(2) 2.0 |
469 | \fBsched_setscheduler\fP(2) 2.0 | |
470 | \fBsched_yield\fP(2) 2.0 | |
1d94912f | 471 | \fBseccomp\fP(2) 3.17 |
8717e79e MK |
472 | \fBselect\fP(2) 1.0 |
473 | \fBsemctl\fP(2) 2.0 See notes on \fBipc\fP(2) | |
474 | \fBsemget\fP(2) 2.0 See notes on \fBipc\fP(2) | |
475 | \fBsemop\fP(2) 2.0 See notes on \fBipc\fP(2) | |
09de4bf1 | 476 | \fBsemtimedop\fP(2) 2.6; 2.4.22 |
8717e79e | 477 | \fBsend\fP(2) 2.0 See notes on \fBsocketcall\fP(2) |
09de4bf1 MK |
478 | \fBsendfile\fP(2) 2.2 |
479 | \fBsendfile64\fP(2) 2.6; 2.4.19 | |
3e55b0bd | 480 | \fBsendmmsg\fP(2) 3.0 |
8717e79e MK |
481 | \fBsendmsg\fP(2) 2.0 See notes on \fBsocketcall\fP(2) |
482 | \fBsendto\fP(2) 2.0 See notes on \fBsocketcall\fP(2) | |
09de4bf1 MK |
483 | \fBset_mempolicy\fP(2) 2.6.6 |
484 | \fBset_robust_list\fP(2) 2.6.17 | |
30fa088c | 485 | \fBset_thread_area\fP(2) 2.6 |
09de4bf1 | 486 | \fBset_tid_address\fP(2) 2.6 |
9947a8d7 MK |
487 | .\" See http://lkml.org/lkml/2005/8/1/83 |
488 | .\" "[PATCH] remove sys_set_zone_reclaim()" | |
8717e79e | 489 | \fBsetdomainname\fP(2) 1.0 |
dc2f5549 | 490 | \fBsetfsgid\fP(2) 1.2 |
09de4bf1 | 491 | \fBsetfsgid32\fP(2) 2.4 |
dc2f5549 | 492 | \fBsetfsuid\fP(2) 1.2 |
09de4bf1 | 493 | \fBsetfsuid32\fP(2) 2.4 |
8717e79e | 494 | \fBsetgid\fP(2) 1.0 |
09de4bf1 | 495 | \fBsetgid32\fP(2) 2.4 |
8717e79e | 496 | \fBsetgroups\fP(2) 1.0 |
09de4bf1 | 497 | \fBsetgroups32\fP(2) 2.4 |
8717e79e MK |
498 | \fBsethostname\fP(2) 1.0 |
499 | \fBsetitimer\fP(2) 1.0 | |
3e55b0bd | 500 | \fBsetns\fP(2) 3.0 |
8717e79e MK |
501 | \fBsetpgid\fP(2) 1.0 |
502 | \fBsetpriority\fP(2) 1.0 | |
503 | \fBsetregid\fP(2) 1.0 | |
09de4bf1 MK |
504 | \fBsetregid32\fP(2) 2.4 |
505 | \fBsetresgid\fP(2) 2.2 | |
506 | \fBsetresgid32\fP(2) 2.4 | |
507 | \fBsetresuid\fP(2) 2.2 | |
508 | \fBsetresuid32\fP(2) 2.4 | |
8717e79e | 509 | \fBsetreuid\fP(2) 1.0 |
09de4bf1 | 510 | \fBsetreuid32\fP(2) 2.4 |
8717e79e MK |
511 | \fBsetrlimit\fP(2) 1.0 |
512 | \fBsetsid\fP(2) 1.0 | |
513 | \fBsetsockopt\fP(2) 2.0 See notes on \fBsocketcall\fP(2) | |
514 | \fBsettimeofday\fP(2) 1.0 | |
515 | \fBsetuid\fP(2) 1.0 | |
09de4bf1 | 516 | \fBsetuid32\fP(2) 2.4 |
e7fa750a | 517 | \fBsetup\fP(2) 1.0 Removed in 2.2 |
09de4bf1 | 518 | \fBsetxattr\fP(2) 2.6; 2.4.18 |
8717e79e MK |
519 | \fBsgetmask\fP(2) 1.0 |
520 | \fBshmat\fP(2) 2.0 See notes on \fBipc\fP(2) | |
521 | \fBshmctl\fP(2) 2.0 See notes on \fBipc\fP(2) | |
522 | \fBshmdt\fP(2) 2.0 See notes on \fBipc\fP(2) | |
523 | \fBshmget\fP(2) 2.0 See notes on \fBipc\fP(2) | |
524 | \fBshutdown\fP(2) 2.0 See notes on \fBsocketcall\fP(2) | |
525 | \fBsigaction\fP(2) 1.0 | |
09de4bf1 | 526 | \fBsigaltstack\fP(2) 2.2 |
8717e79e | 527 | \fBsignal\fP(2) 1.0 |
09de4bf1 | 528 | \fBsignalfd\fP(2) 2.6.22 |
eb153420 | 529 | \fBsignalfd4\fP(2) 2.6.27 |
8717e79e MK |
530 | \fBsigpending\fP(2) 1.0 |
531 | \fBsigprocmask\fP(2) 1.0 | |
532 | \fBsigreturn\fP(2) 1.0 | |
533 | \fBsigsuspend\fP(2) 1.0 | |
534 | \fBsocket\fP(2) 2.0 See notes on \fBsocketcall\fP(2) | |
535 | \fBsocketcall\fP(2) 1.0 | |
7d50a840 | 536 | .\" Implements BSD socket calls |
8717e79e | 537 | \fBsocketpair\fP(2) 2.0 See notes on \fBsocketcall\fP(2) |
09de4bf1 | 538 | \fBsplice\fP(2) 2.6.17 |
f9e4d811 MK |
539 | \fBspu_create\fP(2) 2.6.16 PowerPC only |
540 | \fBspu_run\fP(2) 2.6.16 PowerPC only | |
8717e79e MK |
541 | \fBssetmask\fP(2) 1.0 |
542 | \fBstat\fP(2) 1.0 | |
09de4bf1 | 543 | \fBstat64\fP(2) 2.4 |
8717e79e | 544 | \fBstatfs\fP(2) 1.0 |
09de4bf1 | 545 | \fBstatfs64\fP(2) 2.6 |
8717e79e | 546 | \fBstime\fP(2) 1.0 |
59ec7903 | 547 | \fBsubpage_prot\fP(2) 2.6.25 PowerPC only |
8717e79e MK |
548 | \fBswapoff\fP(2) 1.0 |
549 | \fBswapon\fP(2) 1.0 | |
550 | \fBsymlink\fP(2) 1.0 | |
09de4bf1 | 551 | \fBsymlinkat\fP(2) 2.6.16 |
8717e79e | 552 | \fBsync\fP(2) 1.0 |
09de4bf1 | 553 | \fBsync_file_range\fP(2) 2.6.17 |
b58839b9 | 554 | \fBsync_file_range2\fP(2) 2.6.22 |
83225c1f MK |
555 | .\" PowerPC, ARM, tile |
556 | .\" First appeared on ARM, as arm_sync_file_range(), but later renamed | |
af4c9a82 | 557 | .\" \fBsys_debug_setcontext\fP(2) ??? PowerPC if CONFIG_PPC32 |
dc43a891 | 558 | \fBsyncfs\fP(2) 2.6.39 |
dc2f5549 | 559 | \fBsysfs\fP(2) 1.2 |
8717e79e MK |
560 | \fBsysinfo\fP(2) 1.0 |
561 | \fBsyslog\fP(2) 1.0 | |
7d50a840 | 562 | .\" glibc interface is \fBklogctl\fP(3) |
09de4bf1 MK |
563 | \fBtee\fP(2) 2.6.17 |
564 | \fBtgkill\fP(2) 2.6 | |
8717e79e | 565 | \fBtime\fP(2) 1.0 |
09de4bf1 MK |
566 | \fBtimer_create\fP(2) 2.6 |
567 | \fBtimer_delete\fP(2) 2.6 | |
568 | \fBtimer_getoverrun\fP(2) 2.6 | |
569 | \fBtimer_gettime\fP(2) 2.6 | |
570 | \fBtimer_settime\fP(2) 2.6 | |
0df29603 MK |
571 | \fBtimerfd_create\fP(2) 2.6.25 |
572 | \fBtimerfd_gettime\fP(2) 2.6.25 | |
573 | \fBtimerfd_settime\fP(2) 2.6.25 | |
8717e79e | 574 | \fBtimes\fP(2) 1.0 |
09de4bf1 | 575 | \fBtkill\fP(2) 2.6; 2.4.22 |
8717e79e | 576 | \fBtruncate\fP(2) 1.0 |
09de4bf1 MK |
577 | \fBtruncate64\fP(2) 2.4 |
578 | \fBugetrlimit\fP(2) 2.4 | |
8717e79e MK |
579 | \fBumask\fP(2) 1.0 |
580 | \fBumount\fP(2) 1.0 | |
09de4bf1 MK |
581 | .\" sys_oldumount() -- __NR_umount |
582 | \fBumount2\fP(2) 2.2 | |
583 | .\" sys_umount() -- __NR_umount2 | |
8717e79e MK |
584 | \fBuname\fP(2) 1.0 |
585 | \fBunlink\fP(2) 1.0 | |
09de4bf1 MK |
586 | \fBunlinkat\fP(2) 2.6.16 |
587 | \fBunshare\fP(2) 2.6.16 | |
8717e79e MK |
588 | \fBuselib\fP(2) 1.0 |
589 | \fBustat\fP(2) 1.0 | |
b5fe4c49 | 590 | \fBuserfaultfd\fP(2) 4.2 |
8717e79e | 591 | \fButime\fP(2) 1.0 |
09de4bf1 | 592 | \fButimensat\fP(2) 2.6.22 |
d3ea5e99 | 593 | \fButimes\fP(2) 2.2 |
283d4234 | 594 | \fButrap_install\fP(2) 2.2 Sparc only |
bea08fec | 595 | .\" FIXME . document utrap_install() |
38291c52 | 596 | .\" There's a man page for Solaris 5.11 |
8717e79e MK |
597 | \fBvfork\fP(2) 2.2 |
598 | \fBvhangup\fP(2) 1.0 | |
b6bc918e MK |
599 | \fBvm86old\fP(2) 1.0 T{ |
600 | Was "vm86"; renamed in | |
601 | 2.0.28/2.2 | |
602 | T} | |
8717e79e | 603 | \fBvm86\fP(2) 2.0.28; 2.2 |
09de4bf1 | 604 | \fBvmsplice\fP(2) 2.6.17 |
8717e79e | 605 | \fBwait4\fP(2) 1.0 |
09de4bf1 | 606 | \fBwaitid\fP(2) 2.6.10 |
8717e79e MK |
607 | \fBwaitpid\fP(2) 1.0 |
608 | \fBwrite\fP(2) 1.0 | |
dc2f5549 | 609 | \fBwritev\fP(2) 2.0 |
09de4bf1 | 610 | .TE |
56f2caff | 611 | .ad |
09de4bf1 | 612 | .PP |
929f1ff7 | 613 | On many platforms, including x86-32, socket calls are all multiplexed |
7d50a840 MK |
614 | (via glibc wrapper functions) through |
615 | .BR socketcall (2) | |
efbfd7ec | 616 | and similarly System\ V IPC calls are multiplexed through |
7d50a840 | 617 | .BR ipc (2). |
0597933f | 618 | |
09de4bf1 | 619 | Although slots are reserved for them in the system call table, |
e0bf9127 | 620 | the following system calls are not implemented in the standard kernel: |
09de4bf1 MK |
621 | .BR afs_syscall (2), \" __NR_afs_syscall is 53 on Linux 2.6.22/i386 |
622 | .BR break (2), \" __NR_break is 17 on Linux 2.6.22/i386 | |
623 | .BR ftime (2), \" __NR_ftime is 35 on Linux 2.6.22/i386 | |
624 | .BR getpmsg (2), \" __NR_getpmsg is 188 on Linux 2.6.22/i386 | |
625 | .BR gtty (2), \" __NR_gtty is 32 on Linux 2.6.22/i386 | |
626 | .BR idle (2), \" __NR_idle is 112 on Linux 2.6.22/i386 | |
627 | .BR lock (2), \" __NR_lock is 53 on Linux 2.6.22/i386 | |
628 | .BR madvise1 (2), \" __NR_madvise1 is 219 on Linux 2.6.22/i386 | |
629 | .BR mpx (2), \" __NR_mpx is 66 on Linux 2.6.22/i386 | |
3b777aff | 630 | .BR phys (2), \" Slot has been reused |
09de4bf1 MK |
631 | .BR prof (2), \" __NR_prof is 44 on Linux 2.6.22/i386 |
632 | .BR profil (2), \" __NR_profil is 98 on Linux 2.6.22/i386 | |
633 | .BR putpmsg (2), \" __NR_putpmsg is 189 on Linux 2.6.22/i386 | |
f9e4d811 MK |
634 | .\" __NR_security is 223 on Linux 2.4/i386; absent on 2.6/i386, present |
635 | .\" on a couple of 2.6 architectures | |
636 | .BR security (2), \" __NR_security is 223 on Linux 2.4/i386 | |
0597933f | 637 | .\" The security call is for future use. |
09de4bf1 | 638 | .BR stty (2), \" __NR_stty is 31 on Linux 2.6.22/i386 |
af4c9a82 | 639 | .BR tuxcall (2), \" __NR_tuxcall is 184 on x86_64, also on PPC and alpha |
09de4bf1 MK |
640 | .BR ulimit (2), \" __NR_ulimit is 58 on Linux 2.6.22/i386 |
641 | and | |
642 | .BR vserver (2) \" __NR_vserver is 273 on Linux 2.6.22/i386 | |
fea681da | 643 | (see also |
fea681da MK |
644 | .BR unimplemented (2)). |
645 | However, | |
646 | .BR ftime (3), | |
b701f72d | 647 | .BR profil (3), |
fea681da MK |
648 | and |
649 | .BR ulimit (3) | |
650 | exist as library routines. | |
09de4bf1 MK |
651 | The slot for |
652 | .BR phys (2) | |
653 | is in use since kernel 2.1.116 for | |
654 | .BR umount (2); | |
e0bf9127 | 655 | .BR phys (2) |
09de4bf1 | 656 | will never be implemented. |
09de4bf1 MK |
657 | The |
658 | .BR getpmsg (2) | |
659 | and | |
660 | .BR putpmsg (2) | |
661 | calls are for kernels patched to support STREAMS, | |
662 | and may never be in the standard kernel. | |
98309d3f MK |
663 | |
664 | There was briefly | |
665 | .BR set_zone_reclaim (2), | |
666 | added in Linux 2.6.13, and removed in 2.6.16; | |
7fac88a9 | 667 | this system call was never available to user space. |
0597933f | 668 | .SH NOTES |
09de4bf1 | 669 | .PP |
fea681da MK |
670 | Roughly speaking, the code belonging to the system call |
671 | with number __NR_xxx defined in | |
672 | .I /usr/include/asm/unistd.h | |
66a9882e | 673 | can be found in the Linux kernel source in the routine |
63aa9df0 | 674 | .IR sys_xxx (). |
fea681da MK |
675 | (The dispatch table for i386 can be found in |
676 | .IR /usr/src/linux/arch/i386/kernel/entry.S .) | |
677 | There are many exceptions, however, mostly because | |
678 | older system calls were superseded by newer ones, | |
c13182ef MK |
679 | and this has been treated somewhat unsystematically. |
680 | On platforms with | |
6c1544c1 | 681 | proprietary operating-system emulation, |
a797afac | 682 | such as parisc, sparc, sparc64, and alpha, |
fea681da MK |
683 | there are many additional system calls; mips64 also contains a full |
684 | set of 32-bit system calls. | |
fea681da | 685 | |
09de4bf1 MK |
686 | Over time, changes to the interfaces of some system calls have been |
687 | necessary. | |
688 | One reason for such changes was the need to increase the size of | |
689 | structures or scalar values passed to the system call. | |
d3c49afa MK |
690 | Because of these changes, certain architectures |
691 | (notably, longstanding 32-bit architectures such as i386) | |
692 | now have various groups of related system calls (e.g., | |
7d50a840 MK |
693 | .BR truncate (2) |
694 | and | |
e04e8187 | 695 | .BR truncate64 (2)) |
7d50a840 MK |
696 | which perform similar tasks, but which vary in |
697 | details such as the size of their arguments. | |
698 | (As noted earlier, applications are generally unaware of this: | |
699 | the glibc wrapper functions do some work to ensure that the right | |
700 | system call is invoked, and that ABI compatibility is | |
701 | preserved for old binaries.) | |
09de4bf1 MK |
702 | Examples of systems calls that exist in multiple versions are |
703 | the following: | |
704 | .IP * 3 | |
7d50a840 | 705 | By now there are three different versions of |
09de4bf1 MK |
706 | .BR stat (2): |
707 | .IR sys_stat () | |
708 | (slot | |
709 | .IR __NR_oldstat ), | |
710 | .IR sys_newstat () | |
711 | (slot | |
712 | .IR __NR_stat ), | |
fea681da | 713 | and |
92a5f983 | 714 | .IR sys_stat64 () |
09de4bf1 MK |
715 | (slot |
716 | .IR __NR_stat64 ), | |
717 | with the last being the most current. | |
f9e4d811 | 718 | .\" e.g., on 2.6.22/i386: __NR_oldstat 18, __NR_stat 106, __NR_stat64 195 |
09de4bf1 MK |
719 | .\" The stat system calls deal with three different data structures, |
720 | .\" defined in include/asm-i386/stat.h: __old_kernel_stat, stat, stat64 | |
721 | A similar story applies for | |
722 | .BR lstat (2) | |
723 | and | |
724 | .BR fstat (2). | |
725 | .IP * | |
726 | Similarly, the defines | |
727 | .IR __NR_oldolduname , | |
728 | .IR __NR_olduname , | |
729 | and | |
0daa9e92 | 730 | .I __NR_uname |
09de4bf1 MK |
731 | refer to the routines |
732 | .IR sys_olduname (), | |
733 | .IR sys_uname () | |
734 | and | |
735 | .IR sys_newuname (). | |
736 | .IP * | |
7d50a840 | 737 | In Linux 2.0, a new version of |
09de4bf1 MK |
738 | .BR vm86 (2) |
739 | appeared, with the old and the new kernel routines being named | |
740 | .IR sys_vm86old () | |
741 | and | |
742 | .IR sys_vm86 (). | |
743 | .IP * | |
7d50a840 | 744 | In Linux 2.4, a new version of |
09de4bf1 MK |
745 | .BR getrlimit (2) |
746 | appeared, with the old and the new kernel routines being named | |
747 | .IR sys_old_getrlimit () | |
748 | (slot | |
749 | .IR __NR_getrlimit ) | |
750 | and | |
751 | .IR sys_getrlimit () | |
752 | (slot | |
753 | .IR __NR_ugetrlimit ). | |
754 | .IP * | |
755 | Linux 2.4 increased the size of user and group IDs from 16 to 32 bits. | |
5024580d | 756 | .\" 64-bit off_t changes: ftruncate64, *stat64, |
09de4bf1 MK |
757 | .\" fcntl64 (because of the flock structure), getdents64, *statfs64 |
758 | To support this change, a range of system calls were added | |
759 | (e.g., | |
760 | .BR chown32 (2), | |
761 | .BR getuid32 (2), | |
762 | .BR getgroups32 (2), | |
763 | .BR setresuid32 (2)), | |
764 | superseding earlier calls of the same name without the | |
765 | "32" suffix. | |
766 | .IP * | |
767 | Linux 2.4 added support for applications on 32-bit architectures | |
768 | to access large files (i.e., files for which the sizes and | |
769 | file offsets can't be represented in 32 bits.) | |
770 | To support this change, replacements were required for system calls | |
771 | that deal with file offsets and sizes. | |
772 | Thus the following system calls were added: | |
773 | .BR fcntl64 (2), | |
09de4bf1 MK |
774 | .BR getdents64 (2), |
775 | .BR stat64 (2), | |
776 | .BR statfs64 (2), | |
470e3031 | 777 | .BR truncate64 (2), |
09de4bf1 MK |
778 | and their analogs that work with file descriptors or |
779 | symbolic links. | |
780 | These system calls supersede the older system calls | |
781 | which, except in the case of the "stat" calls, | |
782 | have the same name without the "64" suffix. | |
ca92ce95 | 783 | |
d3c49afa MK |
784 | On newer platforms that only have 64-bit file access and 32-bit UIDs/GIDs |
785 | (e.g., alpha, ia64, s390x, x86-64), there is just a single version of | |
786 | the UID/GID and file access system calls. | |
787 | On platforms (typically, 32-bit platforms) where the *64 and *32 calls exist, | |
788 | the other versions are obsolete. | |
09de4bf1 MK |
789 | .IP * |
790 | The | |
791 | .I rt_sig* | |
792 | calls were added in kernel 2.2 to support the addition | |
793 | of real-time signals (see | |
794 | .BR signal (7)). | |
795 | These system calls supersede the older system calls of the same | |
796 | name without the "rt_" prefix. | |
797 | .IP * | |
7d50a840 MK |
798 | The |
799 | .BR select (2) | |
fea681da | 800 | and |
7d50a840 | 801 | .BR mmap (2) |
c4bb193f | 802 | system calls use five or more arguments, |
208088b5 | 803 | which caused problems in the way |
c4bb193f | 804 | argument passing on the i386 used to be set up. |
7d50a840 | 805 | Thus, while other architectures have |
09de4bf1 MK |
806 | .IR sys_select () |
807 | and | |
808 | .IR sys_mmap () | |
809 | corresponding to | |
0daa9e92 | 810 | .I __NR_select |
09de4bf1 MK |
811 | and |
812 | .IR __NR_mmap , | |
813 | on i386 one finds | |
814 | .IR old_select () | |
815 | and | |
816 | .IR old_mmap () | |
817 | (routines that use a pointer to a | |
c4bb193f MK |
818 | argument block) instead. |
819 | These days passing five arguments | |
09de4bf1 | 820 | is not a problem any more, and there is a |
0daa9e92 | 821 | .I __NR__newselect |
7d50a840 MK |
822 | .\" (used by libc 6) |
823 | that corresponds directly to | |
09de4bf1 MK |
824 | .IR sys_select () |
825 | and similarly | |
7d50a840 MK |
826 | .IR __NR_mmap2 . |
827 | .\" .PP | |
828 | .\" Two system call numbers, | |
829 | .\" .IR __NR__llseek | |
830 | .\" and | |
831 | .\" .IR __NR__sysctl | |
832 | .\" have an additional underscore absent in | |
833 | .\" .IR sys_llseek () | |
834 | .\" and | |
835 | .\" .IR sys_sysctl (). | |
e0bf9127 | 836 | .\" |
7d50a840 MK |
837 | .\" In kernel 2.1.81, |
838 | .\" .BR lchown (2) | |
e0bf9127 | 839 | .\" and |
7d50a840 MK |
840 | .\" .BR chown (2) |
841 | .\" were swapped; that is, | |
842 | .\" .BR lchown (2) | |
843 | .\" was added with the semantics that were then current for | |
844 | .\" .BR chown (2), | |
845 | .\" and the semantics of the latter call were changed to what | |
846 | .\" they are today. | |
09de4bf1 | 847 | .SH SEE ALSO |
b73bf0ae | 848 | .BR intro (2), |
09de4bf1 | 849 | .BR syscall (2), |
de9ed3a3 | 850 | .BR unimplemented (2), |
5bc20f9e | 851 | .BR errno (3), |
951ae9c0 MF |
852 | .BR libc (7), |
853 | .BR vdso (7) |