SYSCALL(2) RISC/os Reference Manual SYSCALL(2)
NAME
syscall - indirect system call
SYNOPSIS
Headers
For -systype sysv:
#include <sys.s>
For -systype bsd43:
#include <syscall.h>
Declarations
syscall(number, arg, ...)
DESCRIPTION
syscall performs the system call whose assembly language
interface has the specified number, register arguments r0
and r1 and further arguments arg. Symbolic constants for
system calls can be found in the header file <sys.s> for
-systype sysv and <syscall.h> for -systype bsd43.
The r0 value of the system call is returned.
DIAGNOSTICS
When the C-bit is set, syscall returns -1 and sets the
external variable errno (see intro(2)).
ERRORS
There is no way to simulate system calls such as pipe(2),
which return values in register r1.
NOTE
When these routines are used in a program which is compiled
in -systype sysv, they are not resolved by libc.a. See
intro(3-SysV) for more information.
Printed 1/15/91 Page 1