Commit | Line | Data |
---|---|---|
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 |
21 | performs the system call whose assembly language |
22 | interface has the specified | |
931b8415 CL |
23 | .Fa number |
24 | with the specified arguments. | |
cdd5eb15 | 25 | Symbolic 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 | 29 | The r0 value of the system call is returned. |
695ad0b4 | 30 | When the C-bit is set, |
931b8415 CL |
31 | .Fn syscall |
32 | returns -1 and sets the | |
695ad0b4 | 33 | external variable |
931b8415 | 34 | .Va errno |
695ad0b4 | 35 | (see |
931b8415 CL |
36 | .Xr intro 2 ) . |
37 | .Sh BUGS | |
695ad0b4 KM |
38 | There is no way to simulate system calls |
39 | such as | |
931b8415 CL |
40 | .Xr pipe 2 . |
41 | .Sh HISTORY | |
42 | The | |
43 | .Nm | |
44 | function call appeared in | |
45 | .Bx 4.0 . |