xref: /csrg-svn/lib/libc/sys/syscall.2 (revision 57954)
147208Scael.\" Copyright (c) 1980, 1991 Regents of the University of California.
247208Scael.\" All rights reserved.
320095Smckusick.\"
447208Scael.\" %sccs.include.redist.man%
520095Smckusick.\"
6*57954Sbostic.\"     @(#)syscall.2	6.4 (Berkeley) 02/12/93
747208Scael.\"
847208Scael.Dd
947208Scael.Dt SYSCALL 2
1047208Scael.Os BSD 4
1147208Scael.Sh NAME
1247208Scael.Nm syscall
1347208Scael.Nd indirect system call
1447208Scael.Sh SYNOPSIS
15*57954Sbostic.Fd #include <sys/syscall.h>
1647208Scael.Fd #include <unistd.h>
1747208Scael.Ft int
1847208Scael.Fn syscall "int number" "..."
1947208Scael.Sh DESCRIPTION
2047208Scael.Fn Syscall
2120095Smckusickperforms the system call whose assembly language
2220095Smckusickinterface has the specified
2347208Scael.Fa number
2447208Scaelwith the specified arguments.
2527109SmckusickSymbolic constants for system calls can be found in the header file
26*57954Sbostic.Ao Pa sys/syscall.h Ac .
2747208Scael.Pp
2847208Scael.Sh RETURN VALUES
2920095SmckusickThe r0 value of the system call is returned.
3020095SmckusickWhen the C-bit is set,
3147208Scael.Fn syscall
3247208Scaelreturns -1 and sets the
3320095Smckusickexternal variable
3447208Scael.Va errno
3520095Smckusick(see
3647208Scael.Xr intro 2 ) .
3747208Scael.Sh BUGS
3820095SmckusickThere is no way to simulate system calls
3920095Smckusicksuch as
4047208Scael.Xr pipe 2 .
4147208Scael.Sh HISTORY
4247208ScaelThe
4347208Scael.Nm
4447208Scaelfunction call appeared in
4547208Scael.Bx 4.0 .
46