.\" Copyright (c) 1980, 1991 Regents of the University of California. .\" All rights reserved. .\" .\" %sccs.include.redist.man% .\" .\" @(#)syscall.2 6.3 (Berkeley) %G% .\" .Dd .Dt SYSCALL 2 .Os BSD 4 .Sh NAME .Nm syscall .Nd indirect system call .Sh SYNOPSIS .Fd #include .Fd #include .Ft int .Fn syscall "int number" "..." .Sh DESCRIPTION .Fn Syscall performs the system call whose assembly language interface has the specified .Fa number with the specified arguments. Symbolic constants for system calls can be found in the header file .Ao Pa syscall.h Ac . .Pp .Sh RETURN VALUES The r0 value of the system call is returned. When the C-bit is set, .Fn syscall returns -1 and sets the external variable .Va errno (see .Xr intro 2 ) . .Sh BUGS There is no way to simulate system calls such as .Xr pipe 2 . .Sh HISTORY The .Nm function call appeared in .Bx 4.0 .