1 .\" Copyright (C) 1998 Andries Brouwer (aeb@cwi.nl)
2 .\" Modifications for 2.2 and 2.4 Copyright (C) 2002 Ian Redfern
3 .\" <redferni@logica.com>
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .TH SYSCALLS 2 2002-01-07 "Linux" "Linux Programmer's Manual"
27 none \- list of all system calls
29 Linux 2.4 system calls.
31 The system call is the fundamental interface between an application
33 As of Linux 2.4.17, there are 1100 system calls
35 .IR /usr/src/linux/include/asm-*/unistd.h .
36 This man page lists those that are common to most platforms.
79 ftruncate(2), ftruncate64,
80 get\%_kernel\%_syms(2),
82 get\%dents(2), get\%dents64,
83 get\%egid(2), get\%egid32,
84 get\%euid(2), get\%euid32,
85 get\%gid(2), get\%gid32,
86 get\%groups(2), get\%groups32,
96 get\%resgid(2), get\%resgid32,
97 get\%resuid(2), get\%resuid32,
105 get\%uid(2), get\%uid32,
139 oldfstat, oldlstat, oldolduname, oldstat, oldumount, olduname,
161 recv(2), recvfrom(2), recvmsg(2),
171 sched_\%get_\%priority_max(2),
172 sched_\%get_\%priority_min(2),
173 sched_\%get\%param(2),
174 sched_\%get\%scheduler(2),
175 sched_\%rr_\%get_\%interval(2),
176 sched_\%set\%param(2),
177 sched_\%set\%scheduler(2),
182 send(2), sendmsg(2), sendto(2),
184 set\%fsgid(2), set\%fsgid32,
185 set\%fsuid(2), set\%fsuid32,
186 set\%gid(2), set\%gid32,
187 set\%groups(2), set\%groups32,
192 set\%regid(2), set\%regid32,
193 set\%resgid(2), set\%resgid32,
194 set\%resuid(2), set\%resuid32,
195 set\%reuid(2), set\%reuid32,
200 set\%uid(2), set\%uid32,
228 truncate(2), truncate64,
246 Of the above, 9 are obsolete, namely
247 getrlimit, oldfstat, oldlstat, oldolduname, oldstat, olduname,
248 readdir, select and vm86old
251 and 15 are unimplemented in the standard kernel, namely
252 afs_syscall, break, ftime, getpmsg, gtty, idle, lock, mpx, phys,
253 prof, profil, putpmsg, security, stty and ulimit (see also
254 .BR unimplemented (2)).
260 exist as library routines.
261 The slot for phys is in use since 2.1.116 for umount;
262 phys will never be implemented.
263 The getpmsg and putpmsg calls are for
264 kernels patched to support streams, and may never be in the standard
266 The security call is for future use.
268 Roughly speaking, the code belonging to the system call
269 with number __NR_xxx defined in
270 .I /usr/include/asm/unistd.h
271 can be found in the kernel source in the routine
273 (The dispatch table for i386 can be found in
274 .IR /usr/src/linux/arch/i386/kernel/entry.S .)
275 There are many exceptions, however, mostly because
276 older system calls were superseded by newer ones,
277 and this has been treated somewhat unsystematically.
279 proprietary OS emulation, such as parisc, sparc, sparc64 and alpha,
280 there are many additional system calls; mips64 also contains a full
281 set of 32-bit system calls.
282 Below the details for Linux 2.4.17.
284 The defines __NR_oldstat and __NR_stat refer to the routines
285 sys_stat() and sys_newstat(), and similarly for
289 Similarly, the defines __NR_oldolduname, __NR_olduname and
290 __NR_uname refer to the routines sys_olduname(), sys_uname()
292 Thus, __NR_stat and __NR_uname have always referred to the latest
293 version of the system call, and the older ones are for backward
300 These use five or more parameters, and caused problems the way
301 parameter passing on the i386 used to be set up.
303 other architectures have sys_select() and sys_mmap() corresponding
304 to __NR_select and __NR_mmap, on i386 one finds old_select()
305 and old_mmap() (routines that use a pointer to a
306 parameter block) instead.
307 These days passing five parameters
308 is not a problem any more, and there is a __NR__newselect (used by
309 libc 6) that corresponds directly to sys_select() and similarly __NR_mmap2.
311 Two other system call numbers, __NR__llseek and __NR__sysctl
312 have an additional underscore absent in sys_llseek() and sys_sysctl().
314 Then there is __NR_readdir corresponding to old_readdir(),
315 which will read at most one directory entry at a time, and is
316 superseded by sys_getdents().
318 On many platforms, including i386, socket calls are all multiplexed
319 through socketcall() and System V IPC calls through ipc().
321 On newer platforms that only have 64-bit file access and 32-bit uids
322 (e.g., alpha, ia64, s390x) there are no *64 or *32 calls.
324 and *32 calls exist, the other versions are obsolete.
326 The chown and lchown system calls were swapped in 2.1.81.
328 *32 calls were added for kernel 2.4, as were the new versions of
329 getrlimit and mmap, and the new calls pivot_root, mincore, madvise,
330 security, gettid and readahead.