147208Scael.\" Copyright (c) 1980, 1991 Regents of the University of California. 247208Scael.\" All rights reserved. 320095Smckusick.\" 447208Scael.\" %sccs.include.redist.man% 520095Smckusick.\" 6*63447Smckusick.\" @(#)syscall.2 6.5 (Berkeley) 06/16/93 747208Scael.\" 847208Scael.Dd 947208Scael.Dt SYSCALL 2 1047208Scael.Os BSD 4 1147208Scael.Sh NAME 12*63447Smckusick.Nm syscall , 13*63447Smckusick.Nm _syscall 1447208Scael.Nd indirect system call 1547208Scael.Sh SYNOPSIS 1657954Sbostic.Fd #include <sys/syscall.h> 1747208Scael.Fd #include <unistd.h> 1847208Scael.Ft int 1947208Scael.Fn syscall "int number" "..." 20*63447Smckusick.Ft int 21*63447Smckusick.Fn _syscall "quad_t number" "..." 2247208Scael.Sh DESCRIPTION 2347208Scael.Fn Syscall 2420095Smckusickperforms the system call whose assembly language 2520095Smckusickinterface has the specified 2647208Scael.Fa number 2747208Scaelwith the specified arguments. 2827109SmckusickSymbolic constants for system calls can be found in the header file 2957954Sbostic.Ao Pa sys/syscall.h Ac . 30*63447SmckusickThe 31*63447Smckusick.Nm _syscall 32*63447Smckusickform should be used when one or more of the parameters is a 33*63447Smckusick64-bit argument to ensure that argument alignment is correct. 34*63447SmckusickThis system call is useful for testing new system calls that 35*63447Smckusickdo not have entries in the C library. 3647208Scael.Sh RETURN VALUES 37*63447SmckusickThe return values are defined by the system call being invoked. 38*63447SmckusickIn general, a 0 return value indicates success. 39*63447SmckusickA -1 return value indicates an error, 40*63447Smckusickand an error code is stored in 41*63447Smckusick.Va errno . 4247208Scael.Sh BUGS 43*63447SmckusickThere is no way to simulate system calls that have multiple return values 4420095Smckusicksuch as 4547208Scael.Xr pipe 2 . 4647208Scael.Sh HISTORY 4747208ScaelThe 4847208Scael.Nm 4947208Scaelfunction call appeared in 5047208Scael.Bx 4.0 . 51