syscalls — Linux system calls
Linux system calls.
The system call is the fundamental interface between an application and the Linux kernel.
System calls are generally not invoked directly, but
rather via wrapper functions in glibc (or perhaps some
other library). For details of direct invocation of a
system call, see intro(2). Often, but not
always, the name of the wrapper function is the same as the
name of the system call that it invokes. For example, glibc
contains a function truncate() which invokes the underlying
"truncate" system call.
Often the glibc wrapper function is quite thin, doing little work before invoking the system call.
Sometimes, however, the wrapper function does some extra
work before invoking the system call. For example, nowadays
there are (for reasons described below) two related system
calls, truncate(2) and truncate64(2), and the
glibc truncate() wrapper
function checks which of those system calls are provided by
the kernel and determines which should be employed.
Below is a list of those system calls that are common to
most platforms. In the list, the Kernel column indicates the
kernel version for those system calls that were new in
Linux 2.2, or have appeared since that kernel version. Note
the following points:
Where no kernel version is indicated, the system call appeared in kernel 2.0 or earlier.
Where a system call is marked "2.2" this means the system call probably appeared in a 2.1.x kernel version, and first appeared in a stable kernel with 2.2.0. (Development of the 2.2 kernel was initiated from a branch of kernel 2.0.21 via the 2.1.x unstable kernel series.)
Where a system call is marked "2.4" this means the system call probably appeared in a 2.3.x kernel version, and first appeared in a stable kernel with 2.4.0. (Development of the 2.4 kernel was initiated from a branch of kernel 2.2.8 via the 2.3.x unstable kernel series.)
Where a system call is marked "2.6" this means the system call probably appeared in a 2.5.x kernel version, and first appeared in a stable kernel with 2.6.0. (Development of kernel 2.6 was initiated from a branch of kernel 2.4.15 via the 2.5.x unstable kernel series.)
Starting with kernel 2.6.0, the development model changed, and new system calls may appear in each 2.6.x release. In this case, the exact version number where the system call appeared is shown.
In some cases, a system call was added to a stable kernel series after it branched from the previous stable kernel series, and then backported into the earlier stable kernel series. For example some system calls that appeared in 2.6.x were also backported into a 2.4.x release after 2.4.15. When this is so, the version where the system call appeared in both of the major kernel series is listed.
The list of system calls that are available as at kernel 2.6.22 (or in a few cases only on older kernels) is as follows: