косвенный системный вызов (indirect system call)
Имя (Name)
syscall - indirect system call
Синопсис (Synopsis)
#include <sys/syscall.h>
/* Definition of SYS_*
constants */
#include <unistd.h>
long syscall(long
number, ...);
Feature Test Macro Requirements for glibc (see
feature_test_macros(7)):
syscall
():
Since glibc 2.19:
_DEFAULT_SOURCE
Before glibc 2.19:
_BSD_SOURCE || _SVID_SOURCE
Описание (Description)
syscall
() is a small library function that invokes the system
call whose assembly language interface has the specified number
with the specified arguments. Employing syscall
() is useful, for
example, when invoking a system call that has no wrapper function
in the C library.
syscall
() saves CPU registers before making the system call,
restores the registers upon return from the system call, and
stores any error returned by the system call in errno(3).
Symbolic constants for system call numbers can be found in the
header file <sys/syscall.h>.