date and time created 92/06/23 17:55:33 by mckusick
[unix-history] / usr / src / lib / libc / sys / syscall.2
CommitLineData
931b8415
CL
1.\" Copyright (c) 1980, 1991 Regents of the University of California.
2.\" All rights reserved.
695ad0b4 3.\"
931b8415 4.\" %sccs.include.redist.man%
695ad0b4 5.\"
931b8415
CL
6.\" @(#)syscall.2 6.3 (Berkeley) %G%
7.\"
8.Dd
9.Dt SYSCALL 2
10.Os BSD 4
11.Sh NAME
12.Nm syscall
13.Nd indirect system call
14.Sh SYNOPSIS
15.Fd #include <unistd.h>
16.Fd #include <sys/syscall.h>
17.Ft int
18.Fn syscall "int number" "..."
19.Sh DESCRIPTION
20.Fn Syscall
695ad0b4
KM
21performs the system call whose assembly language
22interface has the specified
931b8415
CL
23.Fa number
24with the specified arguments.
cdd5eb15 25Symbolic constants for system calls can be found in the header file
931b8415
CL
26.Ao Pa syscall.h Ac .
27.Pp
28.Sh RETURN VALUES
695ad0b4 29The r0 value of the system call is returned.
695ad0b4 30When the C-bit is set,
931b8415
CL
31.Fn syscall
32returns -1 and sets the
695ad0b4 33external variable
931b8415 34.Va errno
695ad0b4 35(see
931b8415
CL
36.Xr intro 2 ) .
37.Sh BUGS
695ad0b4
KM
38There is no way to simulate system calls
39such as
931b8415
CL
40.Xr pipe 2 .
41.Sh HISTORY
42The
43.Nm
44function call appeared in
45.Bx 4.0 .