diff options
| author | cgd <cgd@NetBSD.org> | 1995-02-27 12:31:34 +0000 |
|---|---|---|
| committer | cgd <cgd@NetBSD.org> | 1995-02-27 12:31:34 +0000 |
| commit | 4eab61bd40c07b2fc612ad50cface2b77fc110d0 (patch) | |
| tree | 7118747f1d9919499fdea5d7c6908c5cfe04e5a8 /lib/libc/sys/syscall.2 | |
| parent | c67e54a2e2b9f3d455a30d68ea4e09e56d7b9136 (diff) | |
merge with lite, keeping most local changes. clean up Ids
Diffstat (limited to 'lib/libc/sys/syscall.2')
| -rw-r--r-- | lib/libc/sys/syscall.2 | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/lib/libc/sys/syscall.2 b/lib/libc/sys/syscall.2 index ab75cf28523..9de1e392227 100644 --- a/lib/libc/sys/syscall.2 +++ b/lib/libc/sys/syscall.2 @@ -1,5 +1,7 @@ -.\" Copyright (c) 1980, 1991 Regents of the University of California. -.\" All rights reserved. +.\" $NetBSD: syscall.2,v 1.4 1995/02/27 12:38:53 cgd Exp $ +.\" +.\" Copyright (c) 1980, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -29,20 +31,22 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" from: @(#)syscall.2 6.3 (Berkeley) 3/10/91 -.\" $Id: syscall.2,v 1.3 1993/11/25 00:39:55 jtc Exp $ +.\" @(#)syscall.2 8.1 (Berkeley) 6/16/93 .\" -.Dd March 10, 1991 +.Dd June 16, 1993 .Dt SYSCALL 2 .Os BSD 4 .Sh NAME -.Nm syscall +.Nm syscall , +.Nm __syscall .Nd indirect system call .Sh SYNOPSIS -.Fd #include <unistd.h> .Fd #include <sys/syscall.h> +.Fd #include <unistd.h> .Ft int .Fn syscall "int number" "..." +.Ft int +.Fn __syscall "quad_t number" "..." .Sh DESCRIPTION .Fn Syscall performs the system call whose assembly language @@ -50,19 +54,21 @@ 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 +.Ao Pa sys/syscall.h Ac . +The +.Nm __syscall +form should be used when one or more of the parameters is a +64-bit argument to ensure that argument alignment is correct. +This system call is useful for testing new system calls that +do not have entries in the C library. .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 ) . +The return values are defined by the system call being invoked. +In general, a 0 return value indicates success. +A -1 return value indicates an error, +and an error code is stored in +.Va errno . .Sh BUGS -There is no way to simulate system calls +There is no way to simulate system calls that have multiple return values such as .Xr pipe 2 . .Sh HISTORY |
