1syscall(3UCB) SunOS/BSD Compatibility Library Functions syscall(3UCB)
2
3
4
6 syscall - indirect system call
7
9 /usr/ucb/cc [ flag ... ] file ...
10 #include <sys/syscall.h>
11
12 int syscall(number, arg, ...)
13 int number;
14
15
17 syscall() performs the function whose assembly language interface has
18 the specified number, and arguments arg .... Symbolic constants for
19 functions can be found in the header <sys/syscall.h>.
20
22 On error syscall() returns −1 and sets the external variable errno (see
23 Intro(2)).
24
26 <sys/syscall.h>
27
29 Intro(2), pipe(2)
30
32 Use of these interfaces should be restricted to only applications writ‐
33 ten on BSD platforms. Use of these interfaces with any of the system
34 libraries or in multi-thread applications is unsupported.
35
37 There is no way to use syscall() to call functions such as pipe(2)
38 which return values that do not fit into one hardware register.
39
40
41 Since many system calls are implemented as library wrappers around
42 traps to the kernel, these calls may not behave as documented when
43 called from syscall(), which bypasses these wrappers. For these rea‐
44 sons, using syscall() is not recommended.
45
46
47
48SunOS 5.11 30 Oct 2007 syscall(3UCB)