1SYSCALLS(2)                Linux Programmer's Manual               SYSCALLS(2)
2
3
4

NAME

6       syscalls - Linux system calls
7

SYNOPSIS

9       Linux system calls.
10

DESCRIPTION

12       The system call is the fundamental interface between an application and
13       the Linux kernel.
14
15   System calls and library wrapper functions
16       System calls are generally not invoked directly, but rather via wrapper
17       functions  in  glibc  (or  perhaps some other library).  For details of
18       direct invocation of a system  call,  see  intro(2).   Often,  but  not
19       always, the name of the wrapper function is the same as the name of the
20       system call that it invokes.  For example, glibc  contains  a  function
21       truncate() which invokes the underlying "truncate" system call.
22
23       Often the glibc wrapper function is quite thin, doing little work other
24       than copying arguments to the right registers before invoking the  sys‐
25       tem  call,  and  then setting errno appropriately after the system call
26       has returned.   (These  are  the  same  steps  that  are  performed  by
27       syscall(2), which can be used to invoke system calls for which no wrap‐
28       per function is provided.)  Note: system calls indicate  a  failure  by
29       returning a negative error number to the caller; when this happens, the
30       wrapper function negates the returned error number (to  make  it  posi‐
31       tive), copies it to errno, and returns -1 to the caller of the wrapper.
32
33       Sometimes,  however,  the  wrapper function does some extra work before
34       invoking the system call.  For example, nowadays there are (for reasons
35       described  below)  two  related  system  calls,  truncate(2)  and trun‐
36       cate64(2), and the glibc truncate() wrapper function  checks  which  of
37       those  system  calls  are  provided  by the kernel and determines which
38       should be employed.
39
40   System call list
41       Below is a list of the Linux system calls.  In  the  list,  the  Kernel
42       column  indicates  the  kernel version for those system calls that were
43       new in Linux 2.2, or have appeared since that kernel version.  Note the
44       following points:
45
46       *  Where  no  kernel  version is indicated, the system call appeared in
47          kernel 1.0 or earlier.
48
49       *  Where a system call is marked "1.2" this means the system call prob‐
50          ably  appeared  in  a  1.1.x kernel version, and first appeared in a
51          stable kernel with 1.2.  (Development of the 1.2 kernel  was  initi‐
52          ated  from  a  branch  of kernel 1.0.6 via the 1.1.x unstable kernel
53          series.)
54
55       *  Where a system call is marked "2.0" this means the system call prob‐
56          ably  appeared  in  a  1.3.x kernel version, and first appeared in a
57          stable kernel with 2.0.  (Development of the 2.0 kernel  was  initi‐
58          ated from a branch of kernel 1.2.x, somewhere around 1.2.10, via the
59          1.3.x unstable kernel series.)
60
61       *  Where a system call is marked "2.2" this means the system call prob‐
62          ably  appeared  in  a  2.1.x kernel version, and first appeared in a
63          stable kernel with 2.2.0.  (Development of the 2.2 kernel was initi‐
64          ated  from  a  branch of kernel 2.0.21 via the 2.1.x unstable kernel
65          series.)
66
67       *  Where a system call is marked "2.4" this means the system call prob‐
68          ably  appeared  in  a  2.3.x kernel version, and first appeared in a
69          stable kernel with 2.4.0.  (Development of the 2.4 kernel was initi‐
70          ated  from  a  branch  of kernel 2.2.8 via the 2.3.x unstable kernel
71          series.)
72
73       *  Where a system call is marked "2.6" this means the system call prob‐
74          ably  appeared  in  a  2.5.x kernel version, and first appeared in a
75          stable kernel with 2.6.0.  (Development of kernel 2.6 was  initiated
76          from  a  branch  of  kernel  2.4.15  via  the  2.5.x unstable kernel
77          series.)
78
79       *  Starting with kernel 2.6.0, the development model changed,  and  new
80          system  calls  may  appear in each 2.6.x release.  In this case, the
81          exact version number where the system call appeared is shown.   This
82          convention  continues  with the 3.x kernel series, which followed on
83          from kernel 2.6.39, and the 4.x kernel  series,  which  followed  on
84          from kernel 3.19.
85
86       *  In  some  cases,  a  system call was added to a stable kernel series
87          after it branched from the previous stable kernel series,  and  then
88          backported  into the earlier stable kernel series.  For example some
89          system calls that appeared in 2.6.x  were  also  backported  into  a
90          2.4.x  release after 2.4.15.  When this is so, the version where the
91          system call appeared in both of the major kernel series is listed.
92
93       The list of system calls that are available as at kernel 4.11 (or in  a
94       few cases only on older kernels) is as follows:
95
96       System call                Kernel        Notes
97       ────────────────────────────────────────────────────────────────────
98
99       _llseek(2)                 1.2
100       _newselect(2)              2.0
101       _sysctl(2)                 2.0
102       accept(2)                  2.0           See notes on socketcall(2)
103       accept4(2)                 2.6.28
104       access(2)                  1.0
105       acct(2)                    1.0
106       add_key(2)                 2.6.10
107       adjtimex(2)                1.0
108       alarm(2)                   1.0
109       alloc_hugepages(2)         2.5.36        Removed in 2.5.44
110       bdflush(2)                 1.2           Deprecated (does nothing)
111                                                since 2.6
112       bind(2)                    2.0           See notes on socketcall(2)
113       bpf(2)                     3.18
114       brk(2)                     1.0
115       cacheflush(2)              1.2           Not on x86
116       capget(2)                  2.2
117       capset(2)                  2.2
118       chdir(2)                   1.0
119       chmod(2)                   1.0
120       chown(2)                   2.2           See chown(2) for
121                                                version details
122       chown32(2)                 2.4
123       chroot(2)                  1.0
124       clock_adjtime(2)           2.6.39
125       clock_getres(2)            2.6
126       clock_gettime(2)           2.6
127       clock_nanosleep(2)         2.6
128       clock_settime(2)           2.6
129       clone(2)                   1.0
130       close(2)                   1.0
131       connect(2)                 2.0           See notes on socketcall(2)
132
133       copy_file_range(2)         4.5
134       creat(2)                   1.0
135       create_module(2)           1.0           Removed in 2.6
136       delete_module(2)           1.0
137       dup(2)                     1.0
138       dup2(2)                    1.0
139       dup3(2)                    2.6.27
140       epoll_create(2)            2.6
141       epoll_create1(2)           2.6.27
142       epoll_ctl(2)               2.6
143       epoll_pwait(2)             2.6.19
144       epoll_wait(2)              2.6
145       eventfd(2)                 2.6.22
146       eventfd2(2)                2.6.27
147       execve(2)                  1.0
148       execveat(2)                3.19
149       exit(2)                    1.0
150       exit_group(2)              2.6
151       faccessat(2)               2.6.16
152       fadvise64(2)               2.6
153       fadvise64_64(2)            2.6
154       fallocate(2)               2.6.23
155       fanotify_init(2)           2.6.37
156       fanotify_mark(2)           2.6.37
157       fchdir(2)                  1.0
158       fchmod(2)                  1.0
159       fchmodat(2)                2.6.16
160       fchown(2)                  1.0
161       fchown32(2)                2.4
162       fchownat(2)                2.6.16
163       fcntl(2)                   1.0
164       fcntl64(2)                 2.4
165       fdatasync(2)               2.0
166       fgetxattr(2)               2.6; 2.4.18
167       finit_module(2)            3.8
168       flistxattr(2)              2.6; 2.4.18
169       flock(2)                   2.0
170       fork(2)                    1.0
171       free_hugepages(2)          2.5.36        Removed in 2.5.44
172       fremovexattr(2)            2.6; 2.4.18
173       fsetxattr(2)               2.6; 2.4.18
174       fstat(2)                   1.0
175       fstat64(2)                 2.4
176       fstatat64(2)               2.6.16
177       fstatfs(2)                 1.0
178       fstatfs64(2)               2.6
179       fsync(2)                   1.0
180       ftruncate(2)               1.0
181       ftruncate64(2)             2.4
182       futex(2)                   2.6
183       futimesat(2)               2.6.16
184       get_kernel_syms(2)         1.0           Removed in 2.6
185       get_mempolicy(2)           2.6.6
186       get_robust_list(2)         2.6.17
187       get_thread_area(2)         2.6
188       getcpu(2)                  2.6.19
189       getcwd(2)                  2.2
190       getdents(2)                2.0
191       getdents64(2)              2.4
192       getegid(2)                 1.0
193       getegid32(2)               2.4
194       geteuid(2)                 1.0
195       geteuid32(2)               2.4
196       getgid(2)                  1.0
197       getgid32(2)                2.4
198
199       getgroups(2)               1.0
200       getgroups32(2)             2.4
201       getitimer(2)               1.0
202       getpeername(2)             2.0           See notes on socketcall(2)
203       getpagesize(2)             2.0           Not on x86
204       getpgid(2)                 1.0
205       getpgrp(2)                 1.0
206       getpid(2)                  1.0
207       getppid(2)                 1.0
208       getpriority(2)             1.0
209       getrandom(2)               3.17
210       getresgid(2)               2.2
211       getresgid32(2)             2.4
212       getresuid(2)               2.2
213       getresuid32(2)             2.4
214       getrlimit(2)               1.0
215       getrusage(2)               1.0
216       getsid(2)                  2.0
217       getsockname(2)             2.0           See notes on socketcall(2)
218       getsockopt(2)              2.0           See notes on socketcall(2)
219       gettid(2)                  2.4.11
220       gettimeofday(2)            1.0
221       getuid(2)                  1.0
222       getuid32(2)                2.4
223       getunwind(2)               2.4.8         ia64; deprecated
224       getxattr(2)                2.6; 2.4.18
225       init_module(2)             1.0
226       inotify_add_watch(2)       2.6.13
227       inotify_init(2)            2.6.13
228       inotify_init1(2)           2.6.27
229       inotify_rm_watch(2)        2.6.13
230       io_cancel(2)               2.6
231       io_destroy(2)              2.6
232       io_getevents(2)            2.6
233       io_setup(2)                2.6
234       io_submit(2)               2.6
235       ioctl(2)                   1.0
236       ioperm(2)                  1.0
237       iopl(2)                    1.0
238       ioprio_get(2)              2.6.13
239       ioprio_set(2)              2.6.13
240       ipc(2)                     1.0
241       kcmp(2)                    3.5
242       kern_features(2)           3.7           Sparc64
243       kexec_file_load(2)         3.17
244       kexec_load(2)              2.6.13
245       keyctl(2)                  2.6.10
246       kill(2)                    1.0
247       lchown(2)                  1.0           See chown(2) for
248                                                version details
249       lchown32(2)                2.4
250       lgetxattr(2)               2.6; 2.4.18
251       link(2)                    1.0
252       linkat(2)                  2.6.16
253       listen(2)                  2.0           See notes on socketcall(2)
254       listxattr(2)               2.6; 2.4.18
255       llistxattr(2)              2.6; 2.4.18
256       lookup_dcookie(2)          2.6
257       lremovexattr(2)            2.6; 2.4.18
258       lseek(2)                   1.0
259       lsetxattr(2)               2.6; 2.4.18
260       lstat(2)                   1.0
261       lstat64(2)                 2.4
262       madvise(2)                 2.4
263       mbind(2)                   2.6.6
264
265       membarrier(2)              3.17
266       memfd_create(2)            3.17
267       migrate_pages(2)           2.6.16
268       mincore(2)                 2.4
269       mkdir(2)                   1.0
270       mkdirat(2)                 2.6.16
271       mknod(2)                   1.0
272       mknodat(2)                 2.6.16
273       mlock(2)                   2.0
274       mlock2(2)                  4.4
275       mlockall(2)                2.0
276       mmap(2)                    1.0
277       mmap2(2)                   2.4
278       modify_ldt(2)              1.0
279       mount(2)                   1.0
280       move_pages(2)              2.6.18
281       mprotect(2)                1.0
282       mq_getsetattr(2)           2.6.6
283       mq_notify(2)               2.6.6
284       mq_open(2)                 2.6.6
285       mq_timedreceive(2)         2.6.6
286       mq_timedsend(2)            2.6.6
287       mq_unlink(2)               2.6.6
288       mremap(2)                  2.0
289       msgctl(2)                  2.0           See notes on ipc(2)
290       msgget(2)                  2.0           See notes on ipc(2)
291       msgrcv(2)                  2.0           See notes on ipc(2)
292       msgsnd(2)                  2.0           See notes on ipc(2)
293       msync(2)                   2.0
294       munlock(2)                 2.0
295       munlockall(2)              2.0
296       munmap(2)                  1.0
297       name_to_handle_at(2)       2.6.39
298       nanosleep(2)               2.0
299       nfsservctl(2)              2.2           Removed in 3.1
300       nice(2)                    1.0
301       oldfstat(2)                1.0
302       oldlstat(2)                1.0
303       oldolduname(2)             1.0
304       oldstat(2)                 1.0
305       olduname(2)                1.0
306       open(2)                    1.0
307       open_by_handle_at(2)       2.6.39
308       openat(2)                  2.6.16
309       pause(2)                   1.0
310       pciconfig_iobase(2)        2.2.15; 2.4   Not on x86
311       pciconfig_read(2)          2.0.26; 2.2   Not on x86
312       pciconfig_write(2)         2.0.26; 2.2   Not on x86
313       perf_event_open(2)         2.6.31        Was perf_counter_open() in
314                                                2.6.31; renamed in 2.6.32
315       personality(2)             1.2
316       perfctr(2)                 2.2           Sparc; removed in 2.6.34
317       perfmonctl(2)              2.4           ia64
318       pipe(2)                    1.0
319       pipe2(2)                   2.6.27
320       pivot_root(2)              2.4
321       pkey_alloc(2)              4.8
322       pkey_free(2)               4.8
323       pkey_mprotect(2)           4.8
324       poll(2)                    2.0.36; 2.2
325       ppc_rtas(2)                2.6.2         PowerPC only
326       ppc_swapcontext(2)         2.6.3         PowerPC only
327       ppoll(2)                   2.6.16
328       prctl(2)                   2.2
329
330
331       pread64(2)                               Added as "pread" in 2.2;
332                                                renamed "pread64" in 2.6
333       preadv(2)                  2.6.30
334       preadv2(2)                 4.6
335       prlimit64(2)               2.6.36
336       process_vm_readv(2)        3.2
337       process_vm_writev(2)       3.2
338       pselect6(2)                2.6.16
339       ptrace(2)                  1.0
340       pwrite64(2)                              Added as "pwrite" in 2.2;
341                                                renamed "pwrite64" in 2.6
342       pwritev(2)                 2.6.30
343       pwritev2(2)                4.6
344       query_module(2)            2.2           Removed in 2.6
345       quotactl(2)                1.0
346       read(2)                    1.0
347       readahead(2)               2.4.13
348       readdir(2)                 1.0
349       readlink(2)                1.0
350       readlinkat(2)              2.6.16
351       readv(2)                   2.0
352       reboot(2)                  1.0
353       recv(2)                    2.0           See notes on socketcall(2)
354       recvfrom(2)                2.0           See notes on socketcall(2)
355       recvmsg(2)                 2.0           See notes on socketcall(2)
356       recvmmsg(2)                2.6.33
357       remap_file_pages(2)        2.6           Deprecated since 3.16
358       removexattr(2)             2.6; 2.4.18
359       rename(2)                  1.0
360       renameat(2)                2.6.16
361       renameat2(2)               3.15
362       request_key(2)             2.6.10
363       restart_syscall(2)         2.6
364       rmdir(2)                   1.0
365       rt_sigaction(2)            2.2
366       rt_sigpending(2)           2.2
367       rt_sigprocmask(2)          2.2
368       rt_sigqueueinfo(2)         2.2
369       rt_sigreturn(2)            2.2
370       rt_sigsuspend(2)           2.2
371       rt_sigtimedwait(2)         2.2
372       rt_tgsigqueueinfo(2)       2.6.31
373       s390_runtime_instr(2)      3.7           s390 only
374       s390_pci_mmio_read(2)      3.19          s390 only
375       s390_pci_mmio_write(2)     3.19          s390 only
376       s390_sthyi(2)              4.15          s390 only
377       sched_get_priority_max(2)  2.0
378       sched_get_priority_min(2)  2.0
379       sched_getaffinity(2)       2.6
380       sched_getattr(2)           3.14
381       sched_getparam(2)          2.0
382       sched_getscheduler(2)      2.0
383       sched_rr_get_interval(2)   2.0
384       sched_setaffinity(2)       2.6
385       sched_setattr(2)           3.14
386       sched_setparam(2)          2.0
387       sched_setscheduler(2)      2.0
388       sched_yield(2)             2.0
389       seccomp(2)                 3.17
390       select(2)                  1.0
391       semctl(2)                  2.0           See notes on ipc(2)
392       semget(2)                  2.0           See notes on ipc(2)
393       semop(2)                   2.0           See notes on ipc(2)
394       semtimedop(2)              2.6; 2.4.22
395       send(2)                    2.0           See notes on socketcall(2)
396
397       sendfile(2)                2.2
398       sendfile64(2)              2.6; 2.4.19
399       sendmmsg(2)                3.0
400       sendmsg(2)                 2.0           See notes on socketcall(2)
401       sendto(2)                  2.0           See notes on socketcall(2)
402       set_mempolicy(2)           2.6.6
403       set_robust_list(2)         2.6.17
404       set_thread_area(2)         2.6
405       set_tid_address(2)         2.6
406       setdomainname(2)           1.0
407       setfsgid(2)                1.2
408       setfsgid32(2)              2.4
409       setfsuid(2)                1.2
410       setfsuid32(2)              2.4
411       setgid(2)                  1.0
412       setgid32(2)                2.4
413       setgroups(2)               1.0
414       setgroups32(2)             2.4
415       sethostname(2)             1.0
416       setitimer(2)               1.0
417       setns(2)                   3.0
418       setpgid(2)                 1.0
419       setpriority(2)             1.0
420       setregid(2)                1.0
421       setregid32(2)              2.4
422       setresgid(2)               2.2
423       setresgid32(2)             2.4
424       setresuid(2)               2.2
425       setresuid32(2)             2.4
426       setreuid(2)                1.0
427       setreuid32(2)              2.4
428       setrlimit(2)               1.0
429       setsid(2)                  1.0
430       setsockopt(2)              2.0           See notes on socketcall(2)
431       settimeofday(2)            1.0
432       setuid(2)                  1.0
433       setuid32(2)                2.4
434       setup(2)                   1.0           Removed in 2.2
435       setxattr(2)                2.6; 2.4.18
436       sgetmask(2)                1.0
437       shmat(2)                   2.0           See notes on ipc(2)
438       shmctl(2)                  2.0           See notes on ipc(2)
439       shmdt(2)                   2.0           See notes on ipc(2)
440       shmget(2)                  2.0           See notes on ipc(2)
441       shutdown(2)                2.0           See notes on socketcall(2)
442       sigaction(2)               1.0
443       sigaltstack(2)             2.2
444       signal(2)                  1.0
445       signalfd(2)                2.6.22
446       signalfd4(2)               2.6.27
447       sigpending(2)              1.0
448       sigprocmask(2)             1.0
449       sigreturn(2)               1.0
450       sigsuspend(2)              1.0
451       socket(2)                  2.0           See notes on socketcall(2)
452       socketcall(2)              1.0
453       socketpair(2)              2.0           See notes on socketcall(2)
454       splice(2)                  2.6.17
455       spu_create(2)              2.6.16        PowerPC only
456       spu_run(2)                 2.6.16        PowerPC only
457       ssetmask(2)                1.0
458       stat(2)                    1.0
459       stat64(2)                  2.4
460       statfs(2)                  1.0
461       statfs64(2)                2.6
462
463       statx(2)                   4.11
464       stime(2)                   1.0
465       subpage_prot(2)            2.6.25        PowerPC only
466       swapoff(2)                 1.0
467       swapon(2)                  1.0
468       symlink(2)                 1.0
469       symlinkat(2)               2.6.16
470       sync(2)                    1.0
471       sync_file_range(2)         2.6.17
472       sync_file_range2(2)        2.6.22
473       syncfs(2)                  2.6.39
474       sysfs(2)                   1.2
475       sysinfo(2)                 1.0
476       syslog(2)                  1.0
477       tee(2)                     2.6.17
478       tgkill(2)                  2.6
479       time(2)                    1.0
480       timer_create(2)            2.6
481       timer_delete(2)            2.6
482       timer_getoverrun(2)        2.6
483       timer_gettime(2)           2.6
484       timer_settime(2)           2.6
485       timerfd_create(2)          2.6.25
486       timerfd_gettime(2)         2.6.25
487       timerfd_settime(2)         2.6.25
488       times(2)                   1.0
489       tkill(2)                   2.6; 2.4.22
490       truncate(2)                1.0
491       truncate64(2)              2.4
492       ugetrlimit(2)              2.4
493       umask(2)                   1.0
494       umount(2)                  1.0
495       umount2(2)                 2.2
496       uname(2)                   1.0
497       unlink(2)                  1.0
498       unlinkat(2)                2.6.16
499       unshare(2)                 2.6.16
500       uselib(2)                  1.0
501       ustat(2)                   1.0
502       userfaultfd(2)             4.3
503       utime(2)                   1.0
504       utimensat(2)               2.6.22
505       utimes(2)                  2.2
506       utrap_install(2)           2.2           Sparc only
507       vfork(2)                   2.2
508       vhangup(2)                 1.0
509       vm86old(2)                 1.0           Was "vm86"; renamed in
510                                                2.0.28/2.2
511       vm86(2)                    2.0.28; 2.2
512       vmsplice(2)                2.6.17
513       wait4(2)                   1.0
514       waitid(2)                  2.6.10
515       waitpid(2)                 1.0
516       write(2)                   1.0
517       writev(2)                  2.0
518
519       On many platforms, including x86-32, socket calls are  all  multiplexed
520       (via  glibc wrapper functions) through socketcall(2) and similarly Sys‐
521       tem V IPC calls are multiplexed through ipc(2).
522
523       Although slots are reserved for them in the system call table, the fol‐
524       lowing  system  calls  are  not  implemented  in  the  standard kernel:
525       afs_syscall(2),  break(2),  ftime(2),  getpmsg(2),  gtty(2),   idle(2),
526       lock(2),  madvise1(2), mpx(2), phys(2), prof(2), profil(2), putpmsg(2),
527       security(2), stty(2), tuxcall(2), ulimit(2), and vserver(2)  (see  also
528       unimplemented(2)).   However,  ftime(3), profil(3), and ulimit(3) exist
529       as library routines.  The slot for  phys(2)  is  in  use  since  kernel
530       2.1.116   for  umount(2);  phys(2)  will  never  be  implemented.   The
531       getpmsg(2) and putpmsg(2) calls are  for  kernels  patched  to  support
532       STREAMS, and may never be in the standard kernel.
533
534       There  was  briefly  set_zone_reclaim(2),  added  in  Linux 2.6.13, and
535       removed in 2.6.16; this system call was never available to user space.
536

NOTES

538       Roughly speaking, the code belonging to the  system  call  with  number
539       __NR_xxx defined in /usr/include/asm/unistd.h can be found in the Linux
540       kernel source in the routine sys_xxx().  (The dispatch table  for  i386
541       can  be  found  in /usr/src/linux/arch/i386/kernel/entry.S.)  There are
542       many exceptions, however, mostly because older system calls were super‐
543       seded  by  newer  ones, and this has been treated somewhat unsystemati‐
544       cally.  On platforms with proprietary operating-system emulation,  such
545       as  parisc, sparc, sparc64, and alpha, there are many additional system
546       calls; mips64 also contains a full set of 32-bit system calls.
547
548       Over time, changes to the interfaces of some  system  calls  have  been
549       necessary.   One  reason  for such changes was the need to increase the
550       size of structures or scalar values passed to the system call.  Because
551       of  these  changes, certain architectures (notably, longstanding 32-bit
552       architectures such as i386) now have various groups of  related  system
553       calls  (e.g.,  truncate(2)  and  truncate64(2))  which  perform similar
554       tasks, but which vary in details such as the size of  their  arguments.
555       (As  noted  earlier,  applications  are  generally unaware of this: the
556       glibc wrapper functions do some work to ensure that  the  right  system
557       call  is invoked, and that ABI compatibility is preserved for old bina‐
558       ries.)  Examples of systems calls that exist in multiple  versions  are
559       the following:
560
561       *  By  now  there  are  three different versions of stat(2): sys_stat()
562          (slot   __NR_oldstat),   sys_newstat()   (slot    __NR_stat),    and
563          sys_stat64()  (slot  __NR_stat64), with the last being the most cur‐
564          rent.  A similar story applies for lstat(2) and fstat(2).
565
566       *  Similarly,  the   defines   __NR_oldolduname,   __NR_olduname,   and
567          __NR_uname  refer  to  the  routines sys_olduname(), sys_uname() and
568          sys_newuname().
569
570       *  In Linux 2.0, a new version of vm86(2) appeared, with  the  old  and
571          the new kernel routines being named sys_vm86old() and sys_vm86().
572
573       *  In  Linux  2.4, a new version of getrlimit(2) appeared, with the old
574          and the new kernel routines being  named  sys_old_getrlimit()  (slot
575          __NR_getrlimit) and sys_getrlimit() (slot __NR_ugetrlimit).
576
577       *  Linux  2.4  increased  the  size of user and group IDs from 16 to 32
578          bits.  To support this change, a range of system  calls  were  added
579          (e.g.,  chown32(2),  getuid32(2),  getgroups32(2),  setresuid32(2)),
580          superseding earlier calls of the same name without the "32" suffix.
581
582       *  Linux 2.4 added support for applications on 32-bit architectures  to
583          access large files (i.e., files for which the sizes and file offsets
584          can't be represented in 32 bits.)  To support this change,  replace‐
585          ments were required for system calls that deal with file offsets and
586          sizes.  Thus the following system calls were added: fcntl64(2), get‐
587          dents64(2), stat64(2), statfs64(2), truncate64(2), and their analogs
588          that work with file descriptors or  symbolic  links.   These  system
589          calls  supersede the older system calls which, except in the case of
590          the "stat" calls, have the same name without the "64" suffix.
591
592          On newer platforms that only have  64-bit  file  access  and  32-bit
593          UIDs/GIDs (e.g., alpha, ia64, s390x, x86-64), there is just a single
594          version of the UID/GID and file access system calls.   On  platforms
595          (typically, 32-bit platforms) where the *64 and *32 calls exist, the
596          other versions are obsolete.
597
598       *  The rt_sig* calls were added in kernel 2.2 to support  the  addition
599          of  real-time signals (see signal(7)).  These system calls supersede
600          the older system calls of the same name without the "rt_" prefix.
601
602       *  The select(2) and mmap(2) system calls use five or  more  arguments,
603          which  caused  problems in the way argument passing on the i386 used
604          to be set up.  Thus, while other architectures have sys_select() and
605          sys_mmap()  corresponding  to __NR_select and __NR_mmap, on i386 one
606          finds old_select() and old_mmap() (routines that use a pointer to an
607          argument block) instead.  These days passing five arguments is not a
608          problem any more, and there is a  __NR__newselect  that  corresponds
609          directly to sys_select() and similarly __NR_mmap2.
610

SEE ALSO

612       intro(2), syscall(2), unimplemented(2), errno(3), libc(7), vdso(7)
613

COLOPHON

615       This  page  is  part of release 4.16 of the Linux man-pages project.  A
616       description of the project, information about reporting bugs,  and  the
617       latest     version     of     this    page,    can    be    found    at
618       https://www.kernel.org/doc/man-pages/.
619
620
621
622Linux                             2018-02-02                       SYSCALLS(2)
Impressum