Manpage of SYSCALLS
SYSCALLS
Section: Linux Programmer's Manual (2)
Updated: 12 April 2025
Index
NAME
none - list of all system calls
SYNOPSIS
Linux 2.0 system calls.
DESCRIPTION
As of Linux 2.0.34, there are 164 system calls listed in
/usr/include/asm/unistd.h.
This man page lists them (providing hyperlinks if you read this
with a browser).
afs_syscall,
break,
ftime,
gtty,
lock,
mpx,
oldfstat, oldlstat, oldolduname, oldstat, olduname,
phys,
prof, profil,
stty,
ulimit,
Of the above, 5 are obsolete, namely
oldfstat, oldlstat, oldolduname, oldstat and olduname
and 11 are unimplemented, namely
afs_syscall, break, ftime, gtty, lock, mpx, phys, prof, profil,
The slot for phys is in use since 2.1.116 for umount2;
phys will never be implemented.
Roughly speaking, the code belonging to the system call
with number __NR_xxx defined in
/usr/include/asm/unistd.h
can be found in the kernel source in the routine
sys_xxx().
(The dispatch table for i386 can be found in
/usr/src/linux/arch/i386/kernel/entry.S.)
There are many exceptions, however, mostly because
older system calls were superseded by newer ones,
and this has been treated somewhat unsystematically.
Below the details for Linux 2.0.34.
The defines __NR_oldstat and __NR_stat refer to the routines
sys_stat() and sys_newstat(), and similarly for
fstat
and
lstat.
Similarly, the defines __NR_oldolduname, __NR_olduname and
__NR_uname refer to the routines sys_olduname(), sys_uname()
and sys_newuname().
Thus, __NR_stat and __NR_uname have always referred to the latest
version of the system call, and the older ones are for backward
compatibility.
It is different with
select
and
mmap.
These use five or more parameters, and caused problems the way
parameter passing on the i386 used to be set up. Thus, while
other architectures have sys_select() ans sys_mmap() corresponding
to __NR_select and __NR_mmap, on i386 one finds old_select()
and old_mmap() (routines that use a pointer to a
parameter block) instead. These days passing five parameters
is not a problem anymore, and there is a __NR__newselect (used by
libc 6) that corresponds directly to sys_select().
Two other system call numbers, __NR__llseek and __NR__sysctl
have an additional underscore absent in sys_llseek() and sys_sysctl().
Then there is __NR_readdir corresponding to old_readdir(),
which will read at most one directory entry at a time, and is
superseded by sys_getdents().
Finally, the system call 166, with entry point sys_vm86()
does not have a symbolic number at all. This version supersedes
sys_vm86old() with number __NR_vm86.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
This document was created by
using the manual pages.
Time: 11:56:07 GMT, March 24, 2025