SYSCALL(2) — SYSTEM CALLS
NAME
syscall − indirect system call
SYNOPSIS
#include <sys/syscall.h>
int syscall(number, arg, ...)
DESCRIPTION
syscall() performs the system call whose assembly language interface has the specified number, and arguments arg .... Symbolic constants for system calls can be found in the header file <sys/syscall.h>.
On Sun-2, Sun-3, and Sun-4 systems, the value of register d0 after the system call is returned. On Sun386i systems, the value of register %eax is returned.
SEE ALSO
DIAGNOSTICS
When the C-bit is set, syscall() returns −1 and sets the external variable errno (see intro(2)).
BUGS
There is no way to simulate system calls such as pipe(2), which return values in register d1 on Sun-2, Sun-3, and Sun-4 systems or in register %edx on Sun386i systems.
Sun Release 4.0 — Last change: 18 February 1988