Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ syscall(3B) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(2)

pipe(2)

syscall(3B)

NAME

syscall − indirect system call

SYNOPSIS

/usr/ucb/cc [ flag ... ] file ...

#include <sys/syscall.h>

int syscall(int number, /∗ arg ∗/ ...);

DESCRIPTION

syscall() performs the function whose assembly language interface has the specified number, and arguments arg .... Symbolic constants for functions can be found in the header <sys/syscall.h>. 

RETURN VALUES

On error syscall() returns −1 and sets the external variable errno (see intro(2)). 

SEE ALSO

intro(2), pipe(2)

WARNINGS

There is no way to use syscall() to call functions such as pipe(2), which return values that do not fit into one hardware register. 

Since many system calls are implemented as library wrappers around traps to the kernel, these calls may not behave as documented when called from syscall(), which bypasses these wrappers.  For these reasons, using syscall() is not recommended. 

SunOS 5.1  —  Last change: 5 Jul 1990

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026