| 1 |
'\" t |
| 2 |
.\" Copyright 1998, Andries E. Brouwer <[email protected]> |
| 3 |
.\" Copyright 2002, Ian Redfern <[email protected]> |
| 4 |
.\" Copyright 2007, Michael Kerrisk <[email protected]> |
| 5 |
.\" Copyright, the authors of the Linux man-pages project |
| 6 |
.\" |
| 7 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 8 |
.\" |
| 9 |
.TH syscalls 2 2026-02-08 "Linux man-pages 6.18" |
| 10 |
.SH NAME |
| 11 |
syscalls \- Linux system calls |
| 12 |
.SH SYNOPSIS |
| 13 |
.nf |
| 14 |
Linux system calls. |
| 15 |
.fi |
| 16 |
.SH DESCRIPTION |
| 17 |
The system call is the fundamental interface between an application |
| 18 |
and the Linux kernel. |
| 19 |
.SS System calls and library wrapper functions |
| 20 |
System calls are generally not invoked directly, |
| 21 |
but rather via wrapper functions in glibc (or perhaps some other library). |
| 22 |
For details of direct invocation of a system call, see |
| 23 |
.BR intro (2). |
| 24 |
Often, but not always, the name of the wrapper function is the same |
| 25 |
as the name of the system call that it invokes. |
| 26 |
For example, glibc contains a function |
| 27 |
.BR chdir () |
| 28 |
which invokes the underlying "chdir" system call. |
| 29 |
.P |
| 30 |
Often the glibc wrapper function is quite thin, doing little work |
| 31 |
other than copying arguments to the right registers |
| 32 |
before invoking the system call, |
| 33 |
and then setting |
| 34 |
.I errno |
| 35 |
appropriately after the system call has returned. |
| 36 |
(These are the same steps that are performed by |
| 37 |
.BR syscall (2), |
| 38 |
which can be used to invoke system calls |
| 39 |
for which no wrapper function is provided.) |
| 40 |
Note: system calls indicate a failure by returning a negative error |
| 41 |
number to the caller on architectures without a separate error register/flag, |
| 42 |
as noted in |
| 43 |
.BR syscall (2); |
| 44 |
when this happens, |
| 45 |
the wrapper function negates the returned error number |
| 46 |
(to make it positive), copies it to |
| 47 |
.IR errno , |
| 48 |
and returns \-1 to the caller of the wrapper. |
| 49 |
.P |
| 50 |
Sometimes, however, the wrapper function does some extra work |
| 51 |
before invoking the system call. |
| 52 |
For example, nowadays there are (for reasons described below) two |
| 53 |
related system calls, |
| 54 |
.BR truncate (2) |
| 55 |
and |
| 56 |
.BR truncate64 (2), |
| 57 |
and the glibc |
| 58 |
.BR truncate () |
| 59 |
wrapper function checks which of those system calls |
| 60 |
are provided by the kernel and determines which should be employed. |
| 61 |
.SS System call list |
| 62 |
Below is a list of the Linux system calls. |
| 63 |
In the list, the |
| 64 |
.I Kernel |
| 65 |
column indicates the kernel version |
| 66 |
for those system calls that were new in Linux 2.2, |
| 67 |
or have appeared since that kernel version. |
| 68 |
Note the following points: |
| 69 |
.IP \[bu] 3 |
| 70 |
Where no kernel version is indicated, |
| 71 |
the system call appeared in Linux 1.0 or earlier. |
| 72 |
.IP \[bu] |
| 73 |
Where a system call is marked "1.2" |
| 74 |
this means the system call probably appeared in a Linux 1.1.x kernel version, |
| 75 |
and first appeared in a stable kernel with 1.2. |
| 76 |
(Development of the Linux 1.2 kernel was initiated from a branch of |
| 77 |
Linux 1.0.6 via the Linux 1.1.x unstable kernel series.) |
| 78 |
.IP \[bu] |
| 79 |
Where a system call is marked "2.0" |
| 80 |
this means the system call probably appeared in a Linux 1.3.x kernel version, |
| 81 |
and first appeared in a stable kernel with Linux 2.0. |
| 82 |
(Development of the Linux 2.0 kernel was initiated from a branch of |
| 83 |
Linux 1.2.x, somewhere around Linux 1.2.10, |
| 84 |
via the Linux 1.3.x unstable kernel series.) |
| 85 |
.\" Was Linux 2.0 started from a branch of Linux 1.2.10? |
| 86 |
.\" At least from the timestamps of the tarballs of |
| 87 |
.\" of Linux 1.2.10 and Linux 1.3.0, that's how it looks, but in |
| 88 |
.\" fact the diff doesn't seem very clear, the |
| 89 |
.\" Linux 1.3.0 .tar.bz is much bigger (2.0 MB) than the |
| 90 |
.\" Linux 1.2.10 .tar.bz2 (1.8 MB), and AEB points out the |
| 91 |
.\" timestamps of some files in Linux 1.3.0 seem to be older |
| 92 |
.\" than those in Linux 1.2.10. All of this suggests |
| 93 |
.\" that there might not have been a clean branch point. |
| 94 |
.IP \[bu] |
| 95 |
Where a system call is marked "2.2" |
| 96 |
this means the system call probably appeared in a Linux 2.1.x kernel version, |
| 97 |
and first appeared in a stable kernel with Linux 2.2.0. |
| 98 |
(Development of the Linux 2.2 kernel was initiated from a branch of |
| 99 |
Linux 2.0.21 via the Linux 2.1.x unstable kernel series.) |
| 100 |
.IP \[bu] |
| 101 |
Where a system call is marked "2.4" |
| 102 |
this means the system call probably appeared in a Linux 2.3.x kernel version, |
| 103 |
and first appeared in a stable kernel with Linux 2.4.0. |
| 104 |
(Development of the Linux 2.4 kernel was initiated from a branch of |
| 105 |
Linux 2.2.8 via the Linux 2.3.x unstable kernel series.) |
| 106 |
.IP \[bu] |
| 107 |
Where a system call is marked "2.6" |
| 108 |
this means the system call probably appeared in a Linux 2.5.x kernel version, |
| 109 |
and first appeared in a stable kernel with Linux 2.6.0. |
| 110 |
(Development of Linux 2.6 was initiated from a branch |
| 111 |
of Linux 2.4.15 via the Linux 2.5.x unstable kernel series.) |
| 112 |
.IP \[bu] |
| 113 |
Starting with Linux 2.6.0, the development model changed, |
| 114 |
and new system calls may appear in each Linux 2.6.x release. |
| 115 |
In this case, the exact version number where the system call appeared |
| 116 |
is shown. |
| 117 |
This convention continues |
| 118 |
with the Linux 3.x kernel series, |
| 119 |
which followed on from Linux 2.6.39; |
| 120 |
and the Linux 4.x kernel series, |
| 121 |
which followed on from Linux 3.19; |
| 122 |
and the Linux 5.x kernel series, |
| 123 |
which followed on from Linux 4.20; |
| 124 |
and the Linux 6.x kernel series, |
| 125 |
which followed on from Linux 5.19. |
| 126 |
.IP \[bu] |
| 127 |
In some cases, a system call was added to a stable kernel |
| 128 |
series after it branched from the previous stable kernel |
| 129 |
series, and then backported into the earlier stable kernel series. |
| 130 |
For example some system calls that appeared in Linux 2.6.x were also backported |
| 131 |
into a Linux 2.4.x release after Linux 2.4.15. |
| 132 |
When this is so, the version where the system call appeared |
| 133 |
in both of the major kernel series is listed. |
| 134 |
.P |
| 135 |
The list of system calls that are available as at Linux 5.14 |
| 136 |
(or in a few cases only on older kernels) is as follows: |
| 137 |
.P |
| 138 |
.\" |
| 139 |
.\" Looking at scripts/checksyscalls.sh in the kernel source is |
| 140 |
.\" instructive about x86 specifics. |
| 141 |
.\" |
| 142 |
.TS |
| 143 |
Lb Lb Lb |
| 144 |
Lw(26n)2 L Lx. |
| 145 |
System call Kernel Notes |
| 146 |
_ |
| 147 |
\f[B]_llseek\f[](2) 1.2 |
| 148 |
\f[B]_newselect\f[](2) 2.0 |
| 149 |
\f[B]_sysctl\f[](2) 2.0 Removed in 5.5 |
| 150 |
T{ |
| 151 |
.BR accept (2) |
| 152 |
T} 2.0 T{ |
| 153 |
See notes on \f[B]socketcall\f[](2) |
| 154 |
T} |
| 155 |
\f[B]accept4\f[](2) 2.6.28 |
| 156 |
\f[B]access\f[](2) 1.0 |
| 157 |
\f[B]acct\f[](2) 1.0 |
| 158 |
\f[B]add_key\f[](2) 2.6.10 |
| 159 |
\f[B]adjtimex\f[](2) 1.0 |
| 160 |
\f[B]alarm\f[](2) 1.0 |
| 161 |
\f[B]alloc_hugepages\f[](2) 2.5.36 Removed in 2.5.44 |
| 162 |
.\" 4adeefe161a74369e44cc8e663f240ece0470dc3 |
| 163 |
\f[B]arc_gettls\f[](2) 3.9 ARC only |
| 164 |
\f[B]arc_settls\f[](2) 3.9 ARC only |
| 165 |
.\" 91e040a79df73d371f70792f30380d4e44805250 |
| 166 |
\f[B]arc_usr_cmpxchg\f[](2) 4.9 ARC only |
| 167 |
.\" x86: 79170fda313ed5be2394f87aa2a00d597f8ed4a1 |
| 168 |
T{ |
| 169 |
.BR arch_prctl (2) |
| 170 |
T} 2.6 T{ |
| 171 |
x86_64, x86 since 4.12 |
| 172 |
T} |
| 173 |
.\" 9674cdc74d63f346870943ef966a034f8c71ee57 |
| 174 |
\f[B]atomic_barrier\f[](2) 2.6.34 m68k only |
| 175 |
\f[B]atomic_cmpxchg_32\f[](2) 2.6.34 m68k only |
| 176 |
T{ |
| 177 |
.BR bdflush (2) |
| 178 |
T} 1.2 T{ |
| 179 |
Deprecated (does nothing) |
| 180 |
since 2.6, |
| 181 |
removed in 5.15 |
| 182 |
T} |
| 183 |
T{ |
| 184 |
.BR bind (2) |
| 185 |
T} 2.0 T{ |
| 186 |
See notes on \f[B]socketcall\f[](2) |
| 187 |
T} |
| 188 |
\f[B]bpf\f[](2) 3.18 |
| 189 |
\f[B]brk\f[](2) 1.0 |
| 190 |
T{ |
| 191 |
.BR breakpoint (2) |
| 192 |
T} 2.2 T{ |
| 193 |
ARM OABI only, defined with |
| 194 |
\f[B]__ARM_NR\f[] prefix |
| 195 |
T} |
| 196 |
\f[B]cacheflush\f[](2) 1.2 Not on x86 |
| 197 |
\f[B]capget\f[](2) 2.2 |
| 198 |
\f[B]capset\f[](2) 2.2 |
| 199 |
\f[B]chdir\f[](2) 1.0 |
| 200 |
\f[B]chmod\f[](2) 1.0 |
| 201 |
T{ |
| 202 |
.BR chown (2) |
| 203 |
T} 2.2 T{ |
| 204 |
See |
| 205 |
.BR chown (2) |
| 206 |
for |
| 207 |
version details |
| 208 |
T} |
| 209 |
\f[B]chown32\f[](2) 2.4 |
| 210 |
\f[B]chroot\f[](2) 1.0 |
| 211 |
\f[B]clock_adjtime\f[](2) 2.6.39 |
| 212 |
\f[B]clock_getres\f[](2) 2.6 |
| 213 |
\f[B]clock_gettime\f[](2) 2.6 |
| 214 |
\f[B]clock_nanosleep\f[](2) 2.6 |
| 215 |
\f[B]clock_settime\f[](2) 2.6 |
| 216 |
\f[B]clone2\f[](2) 2.4 IA-64 only |
| 217 |
\f[B]clone\f[](2) 1.0 |
| 218 |
\f[B]clone3\f[](2) 5.3 |
| 219 |
\f[B]close\f[](2) 1.0 |
| 220 |
\f[B]close_range\f[](2) 5.9 |
| 221 |
.\" .\" dcef1f634657dabe7905af3ccda12cf7f0b6fcc1 |
| 222 |
.\" .\" cc20d42986d5807cbe4f5c7c8e3dab2e59ea0db3 |
| 223 |
.\" .\" db695c0509d6ec9046ee5e4c520a19fa17d9fce2 |
| 224 |
.\" \f[B]cmpxchg\f[](2) 2.6.12 T{ |
| 225 |
.\" ARM, syscall constant never was |
| 226 |
.\" exposed to user space, in-kernel |
| 227 |
.\" definition had \f[B]__ARM_NR\f[] prefix, |
| 228 |
.\" removed in 4.4 |
| 229 |
.\" T} |
| 230 |
.\" 867e359b97c970a60626d5d76bbe2a8fadbf38fb |
| 231 |
.\" bb9d812643d8a121df7d614a2b9c60193a92deb0 |
| 232 |
T{ |
| 233 |
.BR connect (2) |
| 234 |
T} 2.0 T{ |
| 235 |
See notes on \f[B]socketcall\f[](2) |
| 236 |
T} |
| 237 |
\f[B]copy_file_range\f[](2) 4.5 |
| 238 |
\f[B]creat\f[](2) 1.0 |
| 239 |
\f[B]create_module\f[](2) 1.0 Removed in 2.6 |
| 240 |
\f[B]delete_module\f[](2) 1.0 |
| 241 |
.\" 1394f03221790a988afc3e4b3cb79f2e477246a9 |
| 242 |
.\" 4ba66a9760722ccbb691b8f7116cad2f791cca7b |
| 243 |
\f[B]dup\f[](2) 1.0 |
| 244 |
\f[B]dup2\f[](2) 1.0 |
| 245 |
\f[B]dup3\f[](2) 2.6.27 |
| 246 |
\f[B]epoll_create\f[](2) 2.6 |
| 247 |
\f[B]epoll_create1\f[](2) 2.6.27 |
| 248 |
\f[B]epoll_ctl\f[](2) 2.6 |
| 249 |
\f[B]epoll_pwait\f[](2) 2.6.19 |
| 250 |
\f[B]epoll_pwait2\f[](2) 5.11 |
| 251 |
\f[B]epoll_wait\f[](2) 2.6 |
| 252 |
\f[B]eventfd\f[](2) 2.6.22 |
| 253 |
\f[B]eventfd2\f[](2) 2.6.27 |
| 254 |
T{ |
| 255 |
.BR execv (2) |
| 256 |
T} 2.0 T{ |
| 257 |
SPARC/SPARC64 only, for |
| 258 |
compatibility with SunOS |
| 259 |
T} |
| 260 |
\f[B]execve\f[](2) 1.0 |
| 261 |
\f[B]execveat\f[](2) 3.19 |
| 262 |
\f[B]exit\f[](2) 1.0 |
| 263 |
\f[B]exit_group\f[](2) 2.6 |
| 264 |
\f[B]faccessat\f[](2) 2.6.16 |
| 265 |
\f[B]faccessat2\f[](2) 5.8 |
| 266 |
\f[B]fadvise64\f[](2) 2.6 |
| 267 |
.\" Implements \f[B]posix_fadvise\f[](2) |
| 268 |
\f[B]fadvise64_64\f[](2) 2.6 |
| 269 |
\f[B]fallocate\f[](2) 2.6.23 |
| 270 |
\f[B]fanotify_init\f[](2) 2.6.37 |
| 271 |
\f[B]fanotify_mark\f[](2) 2.6.37 |
| 272 |
.\" The fanotify calls were added in Linux 2.6.36, |
| 273 |
.\" but disabled while the API was finalized. |
| 274 |
\f[B]fchdir\f[](2) 1.0 |
| 275 |
\f[B]fchmod\f[](2) 1.0 |
| 276 |
\f[B]fchmodat\f[](2) 2.6.16 |
| 277 |
\f[B]fchown\f[](2) 1.0 |
| 278 |
\f[B]fchown32\f[](2) 2.4 |
| 279 |
\f[B]fchownat\f[](2) 2.6.16 |
| 280 |
\f[B]fcntl\f[](2) 1.0 |
| 281 |
\f[B]fcntl64\f[](2) 2.4 |
| 282 |
\f[B]fdatasync\f[](2) 2.0 |
| 283 |
\f[B]fgetxattr\f[](2) 2.6; 2.4.18 |
| 284 |
\f[B]finit_module\f[](2) 3.8 |
| 285 |
\f[B]flistxattr\f[](2) 2.6; 2.4.18 |
| 286 |
\f[B]flock\f[](2) 2.0 |
| 287 |
\f[B]fork\f[](2) 1.0 |
| 288 |
\f[B]free_hugepages\f[](2) 2.5.36 Removed in 2.5.44 |
| 289 |
\f[B]fremovexattr\f[](2) 2.6; 2.4.18 |
| 290 |
\f[B]fsconfig\f[](2) 5.2 |
| 291 |
\f[B]fsetxattr\f[](2) 2.6; 2.4.18 |
| 292 |
\f[B]fsmount\f[](2) 5.2 |
| 293 |
\f[B]fsopen\f[](2) 5.2 |
| 294 |
\f[B]fspick\f[](2) 5.2 |
| 295 |
\f[B]fstat\f[](2) 1.0 |
| 296 |
\f[B]fstat64\f[](2) 2.4 |
| 297 |
\f[B]fstatat64\f[](2) 2.6.16 |
| 298 |
\f[B]fstatfs\f[](2) 1.0 |
| 299 |
\f[B]fstatfs64\f[](2) 2.6 |
| 300 |
\f[B]fsync\f[](2) 1.0 |
| 301 |
\f[B]ftruncate\f[](2) 1.0 |
| 302 |
\f[B]ftruncate64\f[](2) 2.4 |
| 303 |
\f[B]futex\f[](2) 2.6 |
| 304 |
\f[B]futimesat\f[](2) 2.6.16 |
| 305 |
\f[B]get_kernel_syms\f[](2) 1.0 Removed in 2.6 |
| 306 |
\f[B]get_mempolicy\f[](2) 2.6.6 |
| 307 |
\f[B]get_robust_list\f[](2) 2.6.17 |
| 308 |
\f[B]get_thread_area\f[](2) 2.6 |
| 309 |
.\" 8fcd6c45f5a65621ec809b7866a3623e9a01d4ed |
| 310 |
T{ |
| 311 |
.BR get_tls (2) |
| 312 |
T} 4.15 T{ |
| 313 |
ARM OABI only, has |
| 314 |
\f[B]__ARM_NR\f[] prefix |
| 315 |
T} |
| 316 |
\f[B]getcpu\f[](2) 2.6.19 |
| 317 |
\f[B]getcwd\f[](2) 2.2 |
| 318 |
\f[B]getdents\f[](2) 2.0 |
| 319 |
\f[B]getdents64\f[](2) 2.4 |
| 320 |
.\" parisc: 863722e856e64dae0e252b6bb546737c6c5626ce |
| 321 |
T{ |
| 322 |
.BR getdomainname (2) |
| 323 |
T} 2.2 T{ |
| 324 |
SPARC, SPARC64; |
| 325 |
available as \f[B]osf_getdomainname\f[](2) |
| 326 |
on Alpha since Linux 2.0 |
| 327 |
T} |
| 328 |
.\" ec98c6b9b47df6df1c1fa6cf3d427414f8c2cf16 |
| 329 |
T{ |
| 330 |
.BR getdtablesize (2) |
| 331 |
T} 2.0 T{ |
| 332 |
SPARC (removed in 2.6.26), |
| 333 |
available on Alpha as |
| 334 |
\f[B]osf_getdtablesize\f[](2) |
| 335 |
T} |
| 336 |
\f[B]getegid\f[](2) 1.0 |
| 337 |
\f[B]getegid32\f[](2) 2.4 |
| 338 |
\f[B]geteuid\f[](2) 1.0 |
| 339 |
\f[B]geteuid32\f[](2) 2.4 |
| 340 |
\f[B]getgid\f[](2) 1.0 |
| 341 |
\f[B]getgid32\f[](2) 2.4 |
| 342 |
\f[B]getgroups\f[](2) 1.0 |
| 343 |
\f[B]getgroups32\f[](2) 2.4 |
| 344 |
.\" SPARC removal: ec98c6b9b47df6df1c1fa6cf3d427414f8c2cf16 |
| 345 |
T{ |
| 346 |
.BR gethostname (2) |
| 347 |
T} 2.0 T{ |
| 348 |
Alpha, was available on |
| 349 |
SPARC up to Linux 2.6.26 |
| 350 |
T} |
| 351 |
\f[B]getitimer\f[](2) 1.0 |
| 352 |
T{ |
| 353 |
.BR getpeername (2) |
| 354 |
T} 2.0 T{ |
| 355 |
See notes on \f[B]socketcall\f[](2) |
| 356 |
T} |
| 357 |
T{ |
| 358 |
.BR getpagesize (2) |
| 359 |
T} 2.0 T{ |
| 360 |
Alpha, SPARC/SPARC64 only |
| 361 |
T} |
| 362 |
\f[B]getpgid\f[](2) 1.0 |
| 363 |
\f[B]getpgrp\f[](2) 1.0 |
| 364 |
\f[B]getpid\f[](2) 1.0 |
| 365 |
\f[B]getppid\f[](2) 1.0 |
| 366 |
\f[B]getpriority\f[](2) 1.0 |
| 367 |
\f[B]getrandom\f[](2) 3.17 |
| 368 |
\f[B]getresgid\f[](2) 2.2 |
| 369 |
\f[B]getresgid32\f[](2) 2.4 |
| 370 |
\f[B]getresuid\f[](2) 2.2 |
| 371 |
\f[B]getresuid32\f[](2) 2.4 |
| 372 |
\f[B]getrlimit\f[](2) 1.0 |
| 373 |
\f[B]getrusage\f[](2) 1.0 |
| 374 |
\f[B]getsid\f[](2) 2.0 |
| 375 |
T{ |
| 376 |
.BR getsockname (2) |
| 377 |
T} 2.0 T{ |
| 378 |
See notes on \f[B]socketcall\f[](2) |
| 379 |
T} |
| 380 |
T{ |
| 381 |
.BR getsockopt (2) |
| 382 |
T} 2.0 T{ |
| 383 |
See notes on \f[B]socketcall\f[](2) |
| 384 |
T} |
| 385 |
\f[B]gettid\f[](2) 2.4.11 |
| 386 |
\f[B]gettimeofday\f[](2) 1.0 |
| 387 |
\f[B]getuid\f[](2) 1.0 |
| 388 |
\f[B]getuid32\f[](2) 2.4 |
| 389 |
T{ |
| 390 |
.BR getunwind (2) |
| 391 |
T} 2.4.8 T{ |
| 392 |
IA-64 only; |
| 393 |
deprecated |
| 394 |
T} |
| 395 |
\f[B]getxattr\f[](2) 2.6; 2.4.18 |
| 396 |
T{ |
| 397 |
.BR getxgid (2) |
| 398 |
T} 2.0 T{ |
| 399 |
Alpha only; |
| 400 |
see NOTES |
| 401 |
T} |
| 402 |
T{ |
| 403 |
.BR getxpid (2) |
| 404 |
T} 2.0 T{ |
| 405 |
Alpha only; |
| 406 |
see NOTES |
| 407 |
T} |
| 408 |
T{ |
| 409 |
.BR getxuid (2) |
| 410 |
T} 2.0 T{ |
| 411 |
Alpha only; |
| 412 |
see NOTES |
| 413 |
T} |
| 414 |
\f[B]init_module\f[](2) 1.0 |
| 415 |
\f[B]inotify_add_watch\f[](2) 2.6.13 |
| 416 |
\f[B]inotify_init\f[](2) 2.6.13 |
| 417 |
\f[B]inotify_init1\f[](2) 2.6.27 |
| 418 |
\f[B]inotify_rm_watch\f[](2) 2.6.13 |
| 419 |
\f[B]io_cancel\f[](2) 2.6 |
| 420 |
\f[B]io_destroy\f[](2) 2.6 |
| 421 |
\f[B]io_getevents\f[](2) 2.6 |
| 422 |
\f[B]io_pgetevents\f[](2) 4.18 |
| 423 |
\f[B]io_setup\f[](2) 2.6 |
| 424 |
\f[B]io_submit\f[](2) 2.6 |
| 425 |
\f[B]io_uring_enter\f[](2) 5.1 |
| 426 |
\f[B]io_uring_register\f[](2) 5.1 |
| 427 |
\f[B]io_uring_setup\f[](2) 5.1 |
| 428 |
\f[B]ioctl\f[](2) 1.0 |
| 429 |
\f[B]ioperm\f[](2) 1.0 |
| 430 |
\f[B]iopl\f[](2) 1.0 |
| 431 |
\f[B]ioprio_get\f[](2) 2.6.13 |
| 432 |
\f[B]ioprio_set\f[](2) 2.6.13 |
| 433 |
\f[B]ipc\f[](2) 1.0 |
| 434 |
.\" Implements System V IPC calls |
| 435 |
\f[B]kcmp\f[](2) 3.5 |
| 436 |
\f[B]kern_features\f[](2) 3.7 SPARC64 only |
| 437 |
.\" FIXME . document kern_features(): |
| 438 |
.\" commit 517ffce4e1a03aea979fe3a18a3dd1761a24fafb |
| 439 |
\f[B]kexec_file_load\f[](2) 3.17 |
| 440 |
\f[B]kexec_load\f[](2) 2.6.13 |
| 441 |
.\" The entry in the syscall table was reserved starting in 2.6.7 |
| 442 |
.\" Was named sys_kexec_load() from 2.6.7 to 2.6.16 |
| 443 |
\f[B]keyctl\f[](2) 2.6.10 |
| 444 |
\f[B]kill\f[](2) 1.0 |
| 445 |
\f[B]landlock_add_rule\f[](2) 5.13 |
| 446 |
\f[B]landlock_create_ruleset\f[](2) 5.13 |
| 447 |
\f[B]landlock_restrict_self\f[](2) 5.13 |
| 448 |
T{ |
| 449 |
.BR lchown (2) |
| 450 |
T} 1.0 T{ |
| 451 |
See |
| 452 |
.BR chown (2) |
| 453 |
for |
| 454 |
version details |
| 455 |
T} |
| 456 |
\f[B]lchown32\f[](2) 2.4 |
| 457 |
\f[B]lgetxattr\f[](2) 2.6; 2.4.18 |
| 458 |
\f[B]link\f[](2) 1.0 |
| 459 |
\f[B]linkat\f[](2) 2.6.16 |
| 460 |
T{ |
| 461 |
.BR listen (2) |
| 462 |
T} 2.0 T{ |
| 463 |
See notes on \f[B]socketcall\f[](2) |
| 464 |
T} |
| 465 |
\f[B]listxattr\f[](2) 2.6; 2.4.18 |
| 466 |
\f[B]llistxattr\f[](2) 2.6; 2.4.18 |
| 467 |
\f[B]lookup_dcookie\f[](2) 2.6 |
| 468 |
\f[B]lremovexattr\f[](2) 2.6; 2.4.18 |
| 469 |
\f[B]lseek\f[](2) 1.0 |
| 470 |
\f[B]lsetxattr\f[](2) 2.6; 2.4.18 |
| 471 |
\f[B]lstat\f[](2) 1.0 |
| 472 |
\f[B]lstat64\f[](2) 2.4 |
| 473 |
\f[B]madvise\f[](2) 2.4 |
| 474 |
\f[B]mbind\f[](2) 2.6.6 |
| 475 |
\f[B]memory_ordering\f[](2) 2.2 SPARC64 only |
| 476 |
.\" 26025bbfbba33a9425be1b89eccb4664ea4c17b6 |
| 477 |
.\" bb6fb6dfcc17cddac11ac295861f7608194447a7 |
| 478 |
\f[B]membarrier\f[](2) 3.17 |
| 479 |
\f[B]memfd_create\f[](2) 3.17 |
| 480 |
\f[B]memfd_secret\f[](2) 5.14 |
| 481 |
\f[B]migrate_pages\f[](2) 2.6.16 |
| 482 |
\f[B]mincore\f[](2) 2.4 |
| 483 |
\f[B]mkdir\f[](2) 1.0 |
| 484 |
\f[B]mkdirat\f[](2) 2.6.16 |
| 485 |
\f[B]mknod\f[](2) 1.0 |
| 486 |
\f[B]mknodat\f[](2) 2.6.16 |
| 487 |
\f[B]mlock\f[](2) 2.0 |
| 488 |
\f[B]mlock2\f[](2) 4.4 |
| 489 |
\f[B]mlockall\f[](2) 2.0 |
| 490 |
\f[B]mmap\f[](2) 1.0 |
| 491 |
\f[B]mmap2\f[](2) 2.4 |
| 492 |
\f[B]modify_ldt\f[](2) 1.0 |
| 493 |
\f[B]mount\f[](2) 1.0 |
| 494 |
\f[B]move_mount\f[](2) 5.2 |
| 495 |
\f[B]move_pages\f[](2) 2.6.18 |
| 496 |
\f[B]mprotect\f[](2) 1.0 |
| 497 |
\f[B]mq_getsetattr\f[](2) 2.6.6 |
| 498 |
.\" Implements \f[B]mq_getattr\f[](3) and \f[B]mq_setattr\f[](3) |
| 499 |
\f[B]mq_notify\f[](2) 2.6.6 |
| 500 |
\f[B]mq_open\f[](2) 2.6.6 |
| 501 |
\f[B]mq_timedreceive\f[](2) 2.6.6 |
| 502 |
\f[B]mq_timedsend\f[](2) 2.6.6 |
| 503 |
\f[B]mq_unlink\f[](2) 2.6.6 |
| 504 |
\f[B]mremap\f[](2) 2.0 |
| 505 |
T{ |
| 506 |
.BR msgctl (2) |
| 507 |
T} 2.0 T{ |
| 508 |
See notes on \f[B]ipc\f[](2) |
| 509 |
T} |
| 510 |
T{ |
| 511 |
.BR msgget (2) |
| 512 |
T} 2.0 T{ |
| 513 |
See notes on \f[B]ipc\f[](2) |
| 514 |
T} |
| 515 |
T{ |
| 516 |
.BR msgrcv (2) |
| 517 |
T} 2.0 T{ |
| 518 |
See notes on \f[B]ipc\f[](2) |
| 519 |
T} |
| 520 |
T{ |
| 521 |
.BR msgsnd (2) |
| 522 |
T} 2.0 T{ |
| 523 |
See notes on \f[B]ipc\f[](2) |
| 524 |
T} |
| 525 |
\f[B]msync\f[](2) 2.0 |
| 526 |
.\" \f[B]multiplexer\f[](2) ?? __NR_multiplexer reserved on |
| 527 |
.\" PowerPC, but unimplemented? |
| 528 |
\f[B]munlock\f[](2) 2.0 |
| 529 |
\f[B]munlockall\f[](2) 2.0 |
| 530 |
\f[B]munmap\f[](2) 1.0 |
| 531 |
\f[B]name_to_handle_at\f[](2) 2.6.39 |
| 532 |
\f[B]nanosleep\f[](2) 2.0 |
| 533 |
.\" 5590ff0d5528b60153c0b4e7b771472b5a95e297 |
| 534 |
T{ |
| 535 |
.BR newfstatat (2) |
| 536 |
T} 2.6.16 T{ |
| 537 |
See \f[B]stat\f[](2) |
| 538 |
T} |
| 539 |
\f[B]nfsservctl\f[](2) 2.2 Removed in 3.1 |
| 540 |
\f[B]nice\f[](2) 1.0 |
| 541 |
T{ |
| 542 |
.BR old_adjtimex (2) |
| 543 |
T} 2.0 T{ |
| 544 |
Alpha only; |
| 545 |
see NOTES |
| 546 |
T} |
| 547 |
T{ |
| 548 |
.BR old_getrlimit (2) |
| 549 |
T} 2.4 T{ |
| 550 |
Old variant of \f[B]getrlimit\f[](2) |
| 551 |
that used a different value |
| 552 |
for \f[B]RLIM_INFINITY\f[] |
| 553 |
T} |
| 554 |
\f[B]oldfstat\f[](2) 1.0 |
| 555 |
\f[B]oldlstat\f[](2) 1.0 |
| 556 |
\f[B]oldolduname\f[](2) 1.0 |
| 557 |
\f[B]oldstat\f[](2) 1.0 |
| 558 |
T{ |
| 559 |
.BR oldumount (2) |
| 560 |
T} 2.4.116 T{ |
| 561 |
Name of the old \f[B]umount\f[](2) |
| 562 |
syscall on Alpha |
| 563 |
T} |
| 564 |
\f[B]olduname\f[](2) 1.0 |
| 565 |
\f[B]open\f[](2) 1.0 |
| 566 |
\f[B]open_by_handle_at\f[](2) 2.6.39 |
| 567 |
\f[B]open_tree\f[](2) 5.2 |
| 568 |
\f[B]openat\f[](2) 2.6.16 |
| 569 |
\f[B]openat2\f[](2) 5.6 |
| 570 |
.\" 9d02a4283e9ce4e9ca11ff00615bdacdb0515a1a |
| 571 |
T{ |
| 572 |
.BR or1k_atomic (2) |
| 573 |
T} 3.1 T{ |
| 574 |
OpenRISC 1000 only |
| 575 |
T} |
| 576 |
\f[B]pause\f[](2) 1.0 |
| 577 |
\f[B]pciconfig_iobase\f[](2) 2.2.15; 2.4 Not on x86 |
| 578 |
.\" Alpha, PowerPC, ARM; not x86 |
| 579 |
\f[B]pciconfig_read\f[](2) 2.0.26; 2.2 Not on x86 |
| 580 |
.\" , PowerPC, ARM; not x86 |
| 581 |
\f[B]pciconfig_write\f[](2) 2.0.26; 2.2 Not on x86 |
| 582 |
.\" , PowerPC, ARM; not x86 |
| 583 |
T{ |
| 584 |
.BR perf_event_open (2) |
| 585 |
T} 2.6.31 T{ |
| 586 |
Was perf_counter_open() in 2.6.31; |
| 587 |
renamed in 2.6.32 |
| 588 |
T} |
| 589 |
\f[B]personality\f[](2) 1.2 |
| 590 |
T{ |
| 591 |
.BR perfctr (2) |
| 592 |
T} 2.2 T{ |
| 593 |
SPARC only; |
| 594 |
removed in 2.6.34 |
| 595 |
T} |
| 596 |
.\" commit c7d5a0050773e98d1094eaa9f2a1a793fafac300 removed perfctr() |
| 597 |
\f[B]perfmonctl\f[](2) 2.4 IA-64 only; removed in 5.10 |
| 598 |
\f[B]pidfd_getfd\f[](2) 5.6 |
| 599 |
\f[B]pidfd_send_signal\f[](2) 5.1 |
| 600 |
\f[B]pidfd_open\f[](2) 5.3 |
| 601 |
\f[B]pipe\f[](2) 1.0 |
| 602 |
\f[B]pipe2\f[](2) 2.6.27 |
| 603 |
\f[B]pivot_root\f[](2) 2.4 |
| 604 |
\f[B]pkey_alloc\f[](2) 4.8 |
| 605 |
\f[B]pkey_free\f[](2) 4.8 |
| 606 |
\f[B]pkey_mprotect\f[](2) 4.8 |
| 607 |
\f[B]poll\f[](2) 2.0.36; 2.2 |
| 608 |
\f[B]ppoll\f[](2) 2.6.16 |
| 609 |
\f[B]prctl\f[](2) 2.2 |
| 610 |
T{ |
| 611 |
.BR pread64 (2) |
| 612 |
T} T{ |
| 613 |
Added as "pread" in 2.2; |
| 614 |
renamed "pread64" in 2.6 |
| 615 |
T} |
| 616 |
\f[B]preadv\f[](2) 2.6.30 |
| 617 |
\f[B]preadv2\f[](2) 4.6 |
| 618 |
\f[B]prlimit64\f[](2) 2.6.36 |
| 619 |
\f[B]process_madvise\f[](2) 5.10 |
| 620 |
\f[B]process_vm_readv\f[](2) 3.2 |
| 621 |
\f[B]process_vm_writev\f[](2) 3.2 |
| 622 |
\f[B]pselect6\f[](2) 2.6.16 |
| 623 |
.\" Implements \f[B]pselect\f[](2) |
| 624 |
\f[B]ptrace\f[](2) 1.0 |
| 625 |
T{ |
| 626 |
.BR pwrite64 (2) |
| 627 |
T} T{ |
| 628 |
Added as "pwrite" in 2.2; |
| 629 |
renamed "pwrite64" in 2.6 |
| 630 |
T} |
| 631 |
\f[B]pwritev\f[](2) 2.6.30 |
| 632 |
\f[B]pwritev2\f[](2) 4.6 |
| 633 |
\f[B]query_module\f[](2) 2.2 Removed in 2.6 |
| 634 |
\f[B]quotactl\f[](2) 1.0 |
| 635 |
\f[B]quotactl_fd\f[](2) 5.14 |
| 636 |
\f[B]read\f[](2) 1.0 |
| 637 |
\f[B]readahead\f[](2) 2.4.13 |
| 638 |
\f[B]readdir\f[](2) 1.0 |
| 639 |
.\" Supersedes \f[B]getdents\f[](2) |
| 640 |
\f[B]readlink\f[](2) 1.0 |
| 641 |
\f[B]readlinkat\f[](2) 2.6.16 |
| 642 |
\f[B]readv\f[](2) 2.0 |
| 643 |
\f[B]reboot\f[](2) 1.0 |
| 644 |
T{ |
| 645 |
.BR recv (2) |
| 646 |
T} 2.0 T{ |
| 647 |
See notes on \f[B]socketcall\f[](2) |
| 648 |
T} |
| 649 |
T{ |
| 650 |
.BR recvfrom (2) |
| 651 |
T} 2.0 T{ |
| 652 |
See notes on \f[B]socketcall\f[](2) |
| 653 |
T} |
| 654 |
T{ |
| 655 |
.BR recvmsg (2) |
| 656 |
T} 2.0 T{ |
| 657 |
See notes on \f[B]socketcall\f[](2) |
| 658 |
T} |
| 659 |
\f[B]recvmmsg\f[](2) 2.6.33 |
| 660 |
T{ |
| 661 |
.BR remap_file_pages (2) |
| 662 |
T} 2.6 T{ |
| 663 |
Deprecated since 3.16 |
| 664 |
T} |
| 665 |
\f[B]removexattr\f[](2) 2.6; 2.4.18 |
| 666 |
\f[B]rename\f[](2) 1.0 |
| 667 |
\f[B]renameat\f[](2) 2.6.16 |
| 668 |
\f[B]renameat2\f[](2) 3.15 |
| 669 |
\f[B]request_key\f[](2) 2.6.10 |
| 670 |
\f[B]restart_syscall\f[](2) 2.6 |
| 671 |
.\" 921ebd8f2c081b3cf6c3b29ef4103eef3ff26054 |
| 672 |
\f[B]riscv_flush_icache\f[](2) 4.15 RISC-V only |
| 673 |
\f[B]rmdir\f[](2) 1.0 |
| 674 |
\f[B]rseq\f[](2) 4.18 |
| 675 |
\f[B]rt_sigaction\f[](2) 2.2 |
| 676 |
\f[B]rt_sigpending\f[](2) 2.2 |
| 677 |
\f[B]rt_sigprocmask\f[](2) 2.2 |
| 678 |
\f[B]rt_sigqueueinfo\f[](2) 2.2 |
| 679 |
\f[B]rt_sigreturn\f[](2) 2.2 |
| 680 |
\f[B]rt_sigsuspend\f[](2) 2.2 |
| 681 |
\f[B]rt_sigtimedwait\f[](2) 2.2 |
| 682 |
\f[B]rt_tgsigqueueinfo\f[](2) 2.6.31 |
| 683 |
T{ |
| 684 |
.BR rtas (2) |
| 685 |
T} 2.6.2 T{ |
| 686 |
PowerPC/PowerPC64 only |
| 687 |
T} |
| 688 |
\f[B]s390_runtime_instr\f[](2) 3.7 s390 only |
| 689 |
\f[B]s390_pci_mmio_read\f[](2) 3.19 s390 only |
| 690 |
\f[B]s390_pci_mmio_write\f[](2) 3.19 s390 only |
| 691 |
\f[B]s390_sthyi\f[](2) 4.15 s390 only |
| 692 |
\f[B]s390_guarded_storage\f[](2) 4.12 s390 only |
| 693 |
T{ |
| 694 |
.BR sched_get_affinity (2) |
| 695 |
T} 2.6 T{ |
| 696 |
Name of |
| 697 |
.BR \%sched_getaffinity (2) |
| 698 |
on SPARC and SPARC64 |
| 699 |
T} |
| 700 |
\f[B]sched_get_priority_max\f[](2) 2.0 |
| 701 |
\f[B]sched_get_priority_min\f[](2) 2.0 |
| 702 |
\f[B]sched_getaffinity\f[](2) 2.6 |
| 703 |
\f[B]sched_getattr\f[](2) 3.14 |
| 704 |
\f[B]sched_getparam\f[](2) 2.0 |
| 705 |
\f[B]sched_getscheduler\f[](2) 2.0 |
| 706 |
\f[B]sched_rr_get_interval\f[](2) 2.0 |
| 707 |
T{ |
| 708 |
.BR sched_set_affinity (2) |
| 709 |
T} 2.6 T{ |
| 710 |
Name of |
| 711 |
.BR \%sched_setaffinity (2) |
| 712 |
on SPARC and SPARC64 |
| 713 |
T} |
| 714 |
\f[B]sched_setaffinity\f[](2) 2.6 |
| 715 |
\f[B]sched_setattr\f[](2) 3.14 |
| 716 |
\f[B]sched_setparam\f[](2) 2.0 |
| 717 |
\f[B]sched_setscheduler\f[](2) 2.0 |
| 718 |
\f[B]sched_yield\f[](2) 2.0 |
| 719 |
\f[B]seccomp\f[](2) 3.17 |
| 720 |
\f[B]select\f[](2) 1.0 |
| 721 |
T{ |
| 722 |
.BR semctl (2) |
| 723 |
T} 2.0 T{ |
| 724 |
See notes on \f[B]ipc\f[](2) |
| 725 |
T} |
| 726 |
T{ |
| 727 |
.BR semget (2) |
| 728 |
T} 2.0 T{ |
| 729 |
See notes on \f[B]ipc\f[](2) |
| 730 |
T} |
| 731 |
T{ |
| 732 |
.BR semop (2) |
| 733 |
T} 2.0 T{ |
| 734 |
See notes on \f[B]ipc\f[](2) |
| 735 |
T} |
| 736 |
\f[B]semtimedop\f[](2) 2.6; 2.4.22 |
| 737 |
T{ |
| 738 |
.BR send (2) |
| 739 |
T} 2.0 T{ |
| 740 |
See notes on \f[B]socketcall\f[](2) |
| 741 |
T} |
| 742 |
\f[B]sendfile\f[](2) 2.2 |
| 743 |
\f[B]sendfile64\f[](2) 2.6; 2.4.19 |
| 744 |
\f[B]sendmmsg\f[](2) 3.0 |
| 745 |
T{ |
| 746 |
.BR sendmsg (2) |
| 747 |
T} 2.0 T{ |
| 748 |
See notes on \f[B]socketcall\f[](2) |
| 749 |
T} |
| 750 |
T{ |
| 751 |
.BR sendto (2) |
| 752 |
T} 2.0 T{ |
| 753 |
See notes on \f[B]socketcall\f[](2) |
| 754 |
T} |
| 755 |
\f[B]set_mempolicy\f[](2) 2.6.6 |
| 756 |
\f[B]set_robust_list\f[](2) 2.6.17 |
| 757 |
\f[B]set_thread_area\f[](2) 2.6 |
| 758 |
\f[B]set_tid_address\f[](2) 2.6 |
| 759 |
T{ |
| 760 |
.BR set_tls (2) |
| 761 |
T} 2.6.11 T{ |
| 762 |
ARM OABI/EABI only (constant |
| 763 |
has \f[B]__ARM_NR\f[] prefix) |
| 764 |
T} |
| 765 |
.\" \f[B]setaltroot\f[](2) 2.6.10 T{ |
| 766 |
.\" Removed in 2.6.11, exposed one |
| 767 |
.\" of implementation details of |
| 768 |
.\" \f[B]personality\f[](2) (creating an |
| 769 |
.\" alternative root, precursor of |
| 770 |
.\" mount namespaces) to user space. |
| 771 |
.\" T} |
| 772 |
.\" See http://lkml.org/lkml/2005/8/1/83 |
| 773 |
.\" "[PATCH] remove sys_set_zone_reclaim()" |
| 774 |
\f[B]setdomainname\f[](2) 1.0 |
| 775 |
\f[B]setfsgid\f[](2) 1.2 |
| 776 |
\f[B]setfsgid32\f[](2) 2.4 |
| 777 |
\f[B]setfsuid\f[](2) 1.2 |
| 778 |
\f[B]setfsuid32\f[](2) 2.4 |
| 779 |
\f[B]setgid\f[](2) 1.0 |
| 780 |
\f[B]setgid32\f[](2) 2.4 |
| 781 |
\f[B]setgroups\f[](2) 1.0 |
| 782 |
\f[B]setgroups32\f[](2) 2.4 |
| 783 |
.\" arch/alpha/include/asm/core_lca.h |
| 784 |
T{ |
| 785 |
.BR sethae (2) |
| 786 |
T} 2.0 T{ |
| 787 |
Alpha only; |
| 788 |
see NOTES |
| 789 |
T} |
| 790 |
\f[B]sethostname\f[](2) 1.0 |
| 791 |
\f[B]setitimer\f[](2) 1.0 |
| 792 |
\f[B]setns\f[](2) 3.0 |
| 793 |
\f[B]setpgid\f[](2) 1.0 |
| 794 |
T{ |
| 795 |
.BR setpgrp (2) |
| 796 |
T} 2.0 T{ |
| 797 |
Alternative name for |
| 798 |
.BR setpgid (2) |
| 799 |
on Alpha |
| 800 |
T} |
| 801 |
\f[B]setpriority\f[](2) 1.0 |
| 802 |
\f[B]setregid\f[](2) 1.0 |
| 803 |
\f[B]setregid32\f[](2) 2.4 |
| 804 |
\f[B]setresgid\f[](2) 2.2 |
| 805 |
\f[B]setresgid32\f[](2) 2.4 |
| 806 |
\f[B]setresuid\f[](2) 2.2 |
| 807 |
\f[B]setresuid32\f[](2) 2.4 |
| 808 |
\f[B]setreuid\f[](2) 1.0 |
| 809 |
\f[B]setreuid32\f[](2) 2.4 |
| 810 |
\f[B]setrlimit\f[](2) 1.0 |
| 811 |
\f[B]setsid\f[](2) 1.0 |
| 812 |
T{ |
| 813 |
.BR setsockopt (2) |
| 814 |
T} 2.0 T{ |
| 815 |
See notes on \f[B]socketcall\f[](2) |
| 816 |
T} |
| 817 |
\f[B]settimeofday\f[](2) 1.0 |
| 818 |
\f[B]setuid\f[](2) 1.0 |
| 819 |
\f[B]setuid32\f[](2) 2.4 |
| 820 |
\f[B]setup\f[](2) 1.0 Removed in 2.2 |
| 821 |
\f[B]setxattr\f[](2) 2.6; 2.4.18 |
| 822 |
\f[B]sgetmask\f[](2) 1.0 |
| 823 |
T{ |
| 824 |
.BR shmat (2) |
| 825 |
T} 2.0 T{ |
| 826 |
See notes on \f[B]ipc\f[](2) |
| 827 |
T} |
| 828 |
T{ |
| 829 |
.BR shmctl (2) |
| 830 |
T} 2.0 T{ |
| 831 |
See notes on \f[B]ipc\f[](2) |
| 832 |
T} |
| 833 |
T{ |
| 834 |
.BR shmdt (2) |
| 835 |
T} 2.0 T{ |
| 836 |
See notes on \f[B]ipc\f[](2) |
| 837 |
T} |
| 838 |
T{ |
| 839 |
.BR shmget (2) |
| 840 |
T} 2.0 T{ |
| 841 |
See notes on \f[B]ipc\f[](2) |
| 842 |
T} |
| 843 |
T{ |
| 844 |
.BR shutdown (2) |
| 845 |
T} 2.0 T{ |
| 846 |
See notes on \f[B]socketcall\f[](2) |
| 847 |
T} |
| 848 |
\f[B]sigaction\f[](2) 1.0 |
| 849 |
\f[B]sigaltstack\f[](2) 2.2 |
| 850 |
\f[B]signal\f[](2) 1.0 |
| 851 |
\f[B]signalfd\f[](2) 2.6.22 |
| 852 |
\f[B]signalfd4\f[](2) 2.6.27 |
| 853 |
\f[B]sigpending\f[](2) 1.0 |
| 854 |
\f[B]sigprocmask\f[](2) 1.0 |
| 855 |
\f[B]sigreturn\f[](2) 1.0 |
| 856 |
\f[B]sigsuspend\f[](2) 1.0 |
| 857 |
T{ |
| 858 |
.BR socket (2) |
| 859 |
T} 2.0 T{ |
| 860 |
See notes on \f[B]socketcall\f[](2) |
| 861 |
T} |
| 862 |
\f[B]socketcall\f[](2) 1.0 |
| 863 |
.\" Implements BSD socket calls |
| 864 |
T{ |
| 865 |
.BR socketpair (2) |
| 866 |
T} 2.0 T{ |
| 867 |
See notes on \f[B]socketcall\f[](2) |
| 868 |
T} |
| 869 |
.\" 5a0015d62668e64c8b6e02e360fbbea121bfd5e6 |
| 870 |
\f[B]spill\f[](2) 2.6.13 Xtensa only |
| 871 |
\f[B]splice\f[](2) 2.6.17 |
| 872 |
T{ |
| 873 |
.BR spu_create (2) |
| 874 |
T} 2.6.16 T{ |
| 875 |
PowerPC/PowerPC64 only |
| 876 |
T} |
| 877 |
T{ |
| 878 |
.BR spu_run (2) |
| 879 |
T} 2.6.16 T{ |
| 880 |
PowerPC/PowerPC64 only |
| 881 |
T} |
| 882 |
\f[B]ssetmask\f[](2) 1.0 |
| 883 |
\f[B]stat\f[](2) 1.0 |
| 884 |
\f[B]stat64\f[](2) 2.4 |
| 885 |
\f[B]statfs\f[](2) 1.0 |
| 886 |
\f[B]statfs64\f[](2) 2.6 |
| 887 |
\f[B]statx\f[](2) 4.11 |
| 888 |
\f[B]stime\f[](2) 1.0 |
| 889 |
T{ |
| 890 |
.BR subpage_prot (2) |
| 891 |
T} 2.6.25 T{ |
| 892 |
PowerPC/PowerPC64 only |
| 893 |
T} |
| 894 |
T{ |
| 895 |
.BR swapcontext (2) |
| 896 |
T} 2.6.3 T{ |
| 897 |
PowerPC/PowerPC64 only |
| 898 |
T} |
| 899 |
.\" 529d235a0e190ded1d21ccc80a73e625ebcad09b |
| 900 |
\f[B]switch_endian\f[](2) 4.1 PowerPC64 only |
| 901 |
\f[B]swapoff\f[](2) 1.0 |
| 902 |
\f[B]swapon\f[](2) 1.0 |
| 903 |
\f[B]symlink\f[](2) 1.0 |
| 904 |
\f[B]symlinkat\f[](2) 2.6.16 |
| 905 |
\f[B]sync\f[](2) 1.0 |
| 906 |
\f[B]sync_file_range\f[](2) 2.6.17 |
| 907 |
\f[B]sync_file_range2\f[](2) 2.6.22 |
| 908 |
.\" PowerPC, ARM, tile |
| 909 |
.\" First appeared on ARM, as arm_sync_file_range(), but later renamed |
| 910 |
.\" \f[B]sys_debug_setcontext\f[](2) ??? PowerPC if CONFIG_PPC32 |
| 911 |
\f[B]syncfs\f[](2) 2.6.39 |
| 912 |
\f[B]sys_debug_setcontext\f[](2) 2.6.11 PowerPC only |
| 913 |
T{ |
| 914 |
.BR syscall (2) |
| 915 |
T} 1.0 T{ |
| 916 |
Still available on ARM OABI |
| 917 |
and MIPS O32 ABI |
| 918 |
T} |
| 919 |
\f[B]sysfs\f[](2) 1.2 |
| 920 |
\f[B]sysinfo\f[](2) 1.0 |
| 921 |
\f[B]syslog\f[](2) 1.0 |
| 922 |
.\" glibc interface is \f[B]klogctl\f[](3) |
| 923 |
\f[B]sysmips\f[](2) 2.6.0 MIPS only |
| 924 |
\f[B]tee\f[](2) 2.6.17 |
| 925 |
\f[B]tgkill\f[](2) 2.6 |
| 926 |
\f[B]time\f[](2) 1.0 |
| 927 |
\f[B]timer_create\f[](2) 2.6 |
| 928 |
\f[B]timer_delete\f[](2) 2.6 |
| 929 |
\f[B]timer_getoverrun\f[](2) 2.6 |
| 930 |
\f[B]timer_gettime\f[](2) 2.6 |
| 931 |
\f[B]timer_settime\f[](2) 2.6 |
| 932 |
.\" .\" b215e283992899650c4271e7385c79e26fb9a88e |
| 933 |
.\" .\" 4d672e7ac79b5ec5cdc90e450823441e20464691 |
| 934 |
.\" \f[B]timerfd\f[](2) 2.6.22 T{ |
| 935 |
.\" Old timerfd interface, |
| 936 |
.\" removed in 2.6.25 |
| 937 |
.\" T} |
| 938 |
\f[B]timerfd_create\f[](2) 2.6.25 |
| 939 |
\f[B]timerfd_gettime\f[](2) 2.6.25 |
| 940 |
\f[B]timerfd_settime\f[](2) 2.6.25 |
| 941 |
\f[B]times\f[](2) 1.0 |
| 942 |
\f[B]tkill\f[](2) 2.6; 2.4.22 |
| 943 |
\f[B]truncate\f[](2) 1.0 |
| 944 |
\f[B]truncate64\f[](2) 2.4 |
| 945 |
\f[B]ugetrlimit\f[](2) 2.4 |
| 946 |
\f[B]umask\f[](2) 1.0 |
| 947 |
\f[B]umount\f[](2) 1.0 |
| 948 |
.\" sys_oldumount() -- __NR_umount |
| 949 |
\f[B]umount2\f[](2) 2.2 |
| 950 |
.\" sys_umount() -- __NR_umount2 |
| 951 |
\f[B]uname\f[](2) 1.0 |
| 952 |
\f[B]unlink\f[](2) 1.0 |
| 953 |
\f[B]unlinkat\f[](2) 2.6.16 |
| 954 |
\f[B]unshare\f[](2) 2.6.16 |
| 955 |
\f[B]uselib\f[](2) 1.0 |
| 956 |
\f[B]ustat\f[](2) 1.0 |
| 957 |
\f[B]userfaultfd\f[](2) 4.3 |
| 958 |
\f[B]usr26\f[](2) 2.4.8.1 ARM OABI only |
| 959 |
\f[B]usr32\f[](2) 2.4.8.1 ARM OABI only |
| 960 |
\f[B]utime\f[](2) 1.0 |
| 961 |
\f[B]utimensat\f[](2) 2.6.22 |
| 962 |
\f[B]utimes\f[](2) 2.2 |
| 963 |
\f[B]utrap_install\f[](2) 2.2 SPARC64 only |
| 964 |
.\" FIXME . document utrap_install() |
| 965 |
.\" There's a man page for Solaris 5.11 |
| 966 |
\f[B]vfork\f[](2) 2.2 |
| 967 |
\f[B]vhangup\f[](2) 1.0 |
| 968 |
T{ |
| 969 |
.BR vm86old (2) |
| 970 |
T} 1.0 T{ |
| 971 |
Was "vm86"; |
| 972 |
renamed in 2.0.28/2.2 |
| 973 |
T} |
| 974 |
\f[B]vm86\f[](2) 2.0.28; 2.2 |
| 975 |
\f[B]vmsplice\f[](2) 2.6.17 |
| 976 |
\f[B]wait4\f[](2) 1.0 |
| 977 |
\f[B]waitid\f[](2) 2.6.10 |
| 978 |
\f[B]waitpid\f[](2) 1.0 |
| 979 |
\f[B]write\f[](2) 1.0 |
| 980 |
\f[B]writev\f[](2) 2.0 |
| 981 |
.\" 5a0015d62668e64c8b6e02e360fbbea121bfd5e6 |
| 982 |
\f[B]xtensa\f[](2) 2.6.13 Xtensa only |
| 983 |
.TE |
| 984 |
.P |
| 985 |
On many platforms, including x86-32, socket calls are all multiplexed |
| 986 |
(via glibc wrapper functions) through |
| 987 |
.BR socketcall (2) |
| 988 |
and similarly System\ V IPC calls are multiplexed through |
| 989 |
.BR ipc (2). |
| 990 |
.P |
| 991 |
Although slots are reserved for them in the system call table, |
| 992 |
the following system calls are not implemented in the standard kernel: |
| 993 |
.BR afs_syscall (2), \" __NR_afs_syscall is 53 on Linux 2.6.22/i386 |
| 994 |
.BR break (2), \" __NR_break is 17 on Linux 2.6.22/i386 |
| 995 |
.BR ftime (2), \" __NR_ftime is 35 on Linux 2.6.22/i386 |
| 996 |
.BR getpmsg (2), \" __NR_getpmsg is 188 on Linux 2.6.22/i386 |
| 997 |
.BR gtty (2), \" __NR_gtty is 32 on Linux 2.6.22/i386 |
| 998 |
.BR idle (2), \" __NR_idle is 112 on Linux 2.6.22/i386 |
| 999 |
.BR lock (2), \" __NR_lock is 53 on Linux 2.6.22/i386 |
| 1000 |
.BR madvise1 (2), \" __NR_madvise1 is 219 on Linux 2.6.22/i386 |
| 1001 |
.BR mpx (2), \" __NR_mpx is 66 on Linux 2.6.22/i386 |
| 1002 |
.BR phys (2), \" Slot has been reused |
| 1003 |
.BR prof (2), \" __NR_prof is 44 on Linux 2.6.22/i386 |
| 1004 |
.BR profil (2), \" __NR_profil is 98 on Linux 2.6.22/i386 |
| 1005 |
.BR putpmsg (2), \" __NR_putpmsg is 189 on Linux 2.6.22/i386 |
| 1006 |
.\" __NR_security is 223 on Linux 2.4/i386; absent on 2.6/i386, present |
| 1007 |
.\" on a couple of 2.6 architectures |
| 1008 |
.BR security (2), \" __NR_security is 223 on Linux 2.4/i386 |
| 1009 |
.\" The security call is for future use. |
| 1010 |
.BR stty (2), \" __NR_stty is 31 on Linux 2.6.22/i386 |
| 1011 |
.BR tuxcall (2), \" __NR_tuxcall is 184 on x86_64, also on PPC and alpha |
| 1012 |
.BR ulimit (2), \" __NR_ulimit is 58 on Linux 2.6.22/i386 |
| 1013 |
and |
| 1014 |
.BR vserver (2) \" __NR_vserver is 273 on Linux 2.6.22/i386 |
| 1015 |
(see also |
| 1016 |
.BR unimplemented (2)). |
| 1017 |
However, |
| 1018 |
.BR ftime (3), |
| 1019 |
.BR profil (3), |
| 1020 |
and |
| 1021 |
.BR ulimit (3) |
| 1022 |
exist as library routines. |
| 1023 |
The slot for |
| 1024 |
.BR phys (2) |
| 1025 |
is in use since Linux 2.1.116 for |
| 1026 |
.BR umount (2); |
| 1027 |
.BR phys (2) |
| 1028 |
will never be implemented. |
| 1029 |
The |
| 1030 |
.BR getpmsg (2) |
| 1031 |
and |
| 1032 |
.BR putpmsg (2) |
| 1033 |
calls are for kernels patched to support STREAMS, |
| 1034 |
and may never be in the standard kernel. |
| 1035 |
.P |
| 1036 |
There was briefly |
| 1037 |
.BR set_zone_reclaim (2), |
| 1038 |
added in Linux 2.6.13, and removed in Linux 2.6.16; |
| 1039 |
this system call was never available to user space. |
| 1040 |
.\" |
| 1041 |
.SS System calls on removed ports |
| 1042 |
Some system calls only ever existed on Linux architectures that have |
| 1043 |
since been removed from the kernel: |
| 1044 |
.TP |
| 1045 |
Blackfin (port removed in Linux 4.17) |
| 1046 |
.RS |
| 1047 |
.PD 0 |
| 1048 |
.IP \[bu] 3 |
| 1049 |
.BR bfin_spinlock (2) |
| 1050 |
(added in Linux 2.6.22) |
| 1051 |
.IP \[bu] |
| 1052 |
.BR dma_memcpy (2) |
| 1053 |
(added in Linux 2.6.22) |
| 1054 |
.IP \[bu] |
| 1055 |
.BR sram_alloc (2) |
| 1056 |
(added in Linux 2.6.22) |
| 1057 |
.IP \[bu] |
| 1058 |
.BR sram_free (2) |
| 1059 |
(added in Linux 2.6.22) |
| 1060 |
.PD |
| 1061 |
.RE |
| 1062 |
.TP |
| 1063 |
Metag (port removed in Linux 4.17) |
| 1064 |
.RS |
| 1065 |
.PD 0 |
| 1066 |
.IP \[bu] 3 |
| 1067 |
.BR metag_get_tls (2) |
| 1068 |
(add in Linux 3.9) |
| 1069 |
.IP \[bu] |
| 1070 |
.BR metag_set_fpu_flags (2) |
| 1071 |
(add in Linux 3.9) |
| 1072 |
.IP \[bu] |
| 1073 |
.BR metag_set_tls (2) |
| 1074 |
(add in Linux 3.9) |
| 1075 |
.IP \[bu] |
| 1076 |
.BR metag_setglobalbit (2) |
| 1077 |
(add in Linux 3.9) |
| 1078 |
.PD |
| 1079 |
.RE |
| 1080 |
.TP |
| 1081 |
Tile (port removed in Linux 4.17) |
| 1082 |
.RS |
| 1083 |
.PD 0 |
| 1084 |
.IP \[bu] 3 |
| 1085 |
.BR cmpxchg_badaddr (2) |
| 1086 |
(added in Linux 2.6.36) |
| 1087 |
.PD |
| 1088 |
.RE |
| 1089 |
.SH NOTES |
| 1090 |
Roughly speaking, the code belonging to the system call |
| 1091 |
with number __NR_xxx defined in |
| 1092 |
.I /usr/include/asm/unistd.h |
| 1093 |
can be found in the Linux kernel source in the routine |
| 1094 |
.IR sys_xxx (). |
| 1095 |
There are many exceptions, however, mostly because |
| 1096 |
older system calls were superseded by newer ones, |
| 1097 |
and this has been treated somewhat unsystematically. |
| 1098 |
On platforms with |
| 1099 |
proprietary operating-system emulation, |
| 1100 |
such as sparc, sparc64, and alpha, |
| 1101 |
there are many additional system calls; |
| 1102 |
mips64 also contains a full set of |
| 1103 |
32-bit system calls. |
| 1104 |
.P |
| 1105 |
Over time, changes to the interfaces of some system calls have been |
| 1106 |
necessary. |
| 1107 |
One reason for such changes was the need to increase the size of |
| 1108 |
structures or scalar values passed to the system call. |
| 1109 |
Because of these changes, certain architectures |
| 1110 |
(notably, longstanding 32-bit architectures such as i386) |
| 1111 |
now have various groups of related system calls (e.g., |
| 1112 |
.BR truncate (2) |
| 1113 |
and |
| 1114 |
.BR truncate64 (2)) |
| 1115 |
which perform similar tasks, but which vary in |
| 1116 |
details such as the size of their arguments. |
| 1117 |
(As noted earlier, applications are generally unaware of this: |
| 1118 |
the glibc wrapper functions do some work to ensure that the right |
| 1119 |
system call is invoked, and that ABI compatibility is |
| 1120 |
preserved for old binaries.) |
| 1121 |
Examples of system calls that exist in multiple versions are |
| 1122 |
the following: |
| 1123 |
.IP \[bu] 3 |
| 1124 |
By now there are three different versions of |
| 1125 |
.BR stat (2): |
| 1126 |
.IR sys_stat () |
| 1127 |
(slot |
| 1128 |
.IR __NR_oldstat ), |
| 1129 |
.IR sys_newstat () |
| 1130 |
(slot |
| 1131 |
.IR __NR_stat ), |
| 1132 |
and |
| 1133 |
.IR sys_stat64 () |
| 1134 |
(slot |
| 1135 |
.IR __NR_stat64 ), |
| 1136 |
with the last being the most current. |
| 1137 |
.\" e.g., on 2.6.22/i386: __NR_oldstat 18, __NR_stat 106, __NR_stat64 195 |
| 1138 |
.\" The stat system calls deal with three different data structures, |
| 1139 |
.\" defined in include/asm-i386/stat.h: __old_kernel_stat, stat, stat64 |
| 1140 |
A similar story applies for |
| 1141 |
.BR lstat (2) |
| 1142 |
and |
| 1143 |
.BR fstat (2). |
| 1144 |
.IP \[bu] |
| 1145 |
Similarly, the defines |
| 1146 |
.IR __NR_oldolduname , |
| 1147 |
.IR __NR_olduname , |
| 1148 |
and |
| 1149 |
.I __NR_uname |
| 1150 |
refer to the routines |
| 1151 |
.IR sys_olduname (), |
| 1152 |
.IR sys_uname (), |
| 1153 |
and |
| 1154 |
.IR sys_newuname (). |
| 1155 |
.IP \[bu] |
| 1156 |
In Linux 2.0, a new version of |
| 1157 |
.BR vm86 (2) |
| 1158 |
appeared, with the old and the new kernel routines being named |
| 1159 |
.IR sys_vm86old () |
| 1160 |
and |
| 1161 |
.IR sys_vm86 (). |
| 1162 |
.IP \[bu] |
| 1163 |
In Linux 2.4, a new version of |
| 1164 |
.BR getrlimit (2) |
| 1165 |
appeared, with the old and the new kernel routines being named |
| 1166 |
.IR sys_old_getrlimit () |
| 1167 |
(slot |
| 1168 |
.IR __NR_getrlimit ) |
| 1169 |
and |
| 1170 |
.IR sys_getrlimit () |
| 1171 |
(slot |
| 1172 |
.IR __NR_ugetrlimit ). |
| 1173 |
.IP \[bu] |
| 1174 |
Linux 2.4 increased the size of user and group IDs from 16 to 32 bits. |
| 1175 |
.\" 64-bit off_t changes: ftruncate64, *stat64, |
| 1176 |
.\" fcntl64 (because of the flock structure), getdents64, *statfs64 |
| 1177 |
To support this change, a range of system calls were added |
| 1178 |
(e.g., |
| 1179 |
.BR chown32 (2), |
| 1180 |
.BR getuid32 (2), |
| 1181 |
.BR getgroups32 (2), |
| 1182 |
.BR setresuid32 (2)), |
| 1183 |
superseding earlier calls of the same name without the |
| 1184 |
"32" suffix. |
| 1185 |
.IP \[bu] |
| 1186 |
Linux 2.4 added support for applications on 32-bit architectures |
| 1187 |
to access large files (i.e., files for which the sizes and |
| 1188 |
file offsets can't be represented in 32 bits.) |
| 1189 |
To support this change, replacements were required for system calls |
| 1190 |
that deal with file offsets and sizes. |
| 1191 |
Thus the following system calls were added: |
| 1192 |
.BR fcntl64 (2), |
| 1193 |
.BR getdents64 (2), |
| 1194 |
.BR stat64 (2), |
| 1195 |
.BR statfs64 (2), |
| 1196 |
.BR truncate64 (2), |
| 1197 |
and their analogs that work with file descriptors or |
| 1198 |
symbolic links. |
| 1199 |
These system calls supersede the older system calls |
| 1200 |
which, except in the case of the "stat" calls, |
| 1201 |
have the same name without the "64" suffix. |
| 1202 |
.IP |
| 1203 |
On newer platforms that only have 64-bit file access and 32-bit UIDs/GIDs |
| 1204 |
(e.g., alpha, ia64, s390x, x86-64), there is just a single version of |
| 1205 |
the UID/GID and file access system calls. |
| 1206 |
On platforms (typically, 32-bit platforms) where the *64 and *32 calls exist, |
| 1207 |
the other versions are obsolete. |
| 1208 |
.IP \[bu] |
| 1209 |
The |
| 1210 |
.I rt_sig* |
| 1211 |
calls were added in Linux 2.2 to support the addition |
| 1212 |
of real-time signals (see |
| 1213 |
.BR signal (7)). |
| 1214 |
These system calls supersede the older system calls of the same |
| 1215 |
name without the "rt_" prefix. |
| 1216 |
.IP \[bu] |
| 1217 |
The |
| 1218 |
.BR select (2) |
| 1219 |
and |
| 1220 |
.BR mmap (2) |
| 1221 |
system calls use five or more arguments, |
| 1222 |
which caused problems in the way |
| 1223 |
argument passing on the i386 used to be set up. |
| 1224 |
Thus, while other architectures have |
| 1225 |
.IR sys_select () |
| 1226 |
and |
| 1227 |
.IR sys_mmap () |
| 1228 |
corresponding to |
| 1229 |
.I __NR_select |
| 1230 |
and |
| 1231 |
.IR __NR_mmap , |
| 1232 |
on i386 one finds |
| 1233 |
.IR old_select () |
| 1234 |
and |
| 1235 |
.IR old_mmap () |
| 1236 |
(routines that use a pointer to an |
| 1237 |
argument block) instead. |
| 1238 |
These days passing five arguments |
| 1239 |
is not a problem any more, and there is a |
| 1240 |
.I __NR__newselect |
| 1241 |
.\" (used by libc 6) |
| 1242 |
that corresponds directly to |
| 1243 |
.IR sys_select () |
| 1244 |
and similarly |
| 1245 |
.IR __NR_mmap2 . |
| 1246 |
s390x is the only 64-bit architecture that has |
| 1247 |
.IR old_mmap (). |
| 1248 |
.\" .P |
| 1249 |
.\" Two system call numbers, |
| 1250 |
.\" .IR __NR__llseek |
| 1251 |
.\" and |
| 1252 |
.\" .IR __NR__sysctl |
| 1253 |
.\" have an additional underscore absent in |
| 1254 |
.\" .IR sys_llseek () |
| 1255 |
.\" and |
| 1256 |
.\" .IR sys_sysctl (). |
| 1257 |
.\" |
| 1258 |
.\" In Linux 2.1.81, |
| 1259 |
.\" .BR lchown (2) |
| 1260 |
.\" and |
| 1261 |
.\" .BR chown (2) |
| 1262 |
.\" were swapped; that is, |
| 1263 |
.\" .BR lchown (2) |
| 1264 |
.\" was added with the semantics that were then current for |
| 1265 |
.\" .BR chown (2), |
| 1266 |
.\" and the semantics of the latter call were changed to what |
| 1267 |
.\" they are today. |
| 1268 |
.\" |
| 1269 |
.\" |
| 1270 |
.SS "Architecture-specific details: Alpha" |
| 1271 |
.TP |
| 1272 |
.BR getxgid (2) |
| 1273 |
returns a pair of GID and effective GID via registers |
| 1274 |
.B r0 |
| 1275 |
and |
| 1276 |
.BR r20 ; |
| 1277 |
it is provided |
| 1278 |
instead of |
| 1279 |
.BR getgid (2) |
| 1280 |
and |
| 1281 |
.BR getegid (2). |
| 1282 |
.TP |
| 1283 |
.BR getxpid (2) |
| 1284 |
returns a pair of PID and parent PID via registers |
| 1285 |
.B r0 |
| 1286 |
and |
| 1287 |
.BR r20 ; |
| 1288 |
it is provided instead of |
| 1289 |
.BR getpid (2) |
| 1290 |
and |
| 1291 |
.BR getppid (2). |
| 1292 |
.TP |
| 1293 |
.BR old_adjtimex (2) |
| 1294 |
is a variant of |
| 1295 |
.BR adjtimex (2) |
| 1296 |
that uses |
| 1297 |
.IR "struct\ timeval32" , |
| 1298 |
for compatibility with OSF/1. |
| 1299 |
.TP |
| 1300 |
.BR getxuid (2) |
| 1301 |
returns a pair of UID and effective UID via registers |
| 1302 |
.B r0 |
| 1303 |
and |
| 1304 |
.BR r20 ; |
| 1305 |
it is provided instead of |
| 1306 |
.BR getuid (2) |
| 1307 |
and |
| 1308 |
.BR geteuid (2). |
| 1309 |
.TP |
| 1310 |
.BR sethae (2) |
| 1311 |
is used for configuring the Host Address Extension register on |
| 1312 |
low-cost Alphas in order to access address space beyond first 27 bits. |
| 1313 |
.SH SEE ALSO |
| 1314 |
.BR intro (2), |
| 1315 |
.BR syscall (2), |
| 1316 |
.BR unimplemented (2), |
| 1317 |
.BR errno (3), |
| 1318 |
.BR libc (7), |
| 1319 |
.BR vdso (7), |
| 1320 |
.BR ausyscall (8) |