3 syscall \- test a system call
15 invokes the system call
17 with the given arguments.
18 (Some functions, such as
22 although not strictly system calls, are valid
24 It prints the return value and the error string, if there was an error.
25 An argument is either an integer constant as in C (its value is passed),
26 a string (its address is passed),
29 (a pointer to a 1MB buffer is passed).
33 is given, the contents of the 1MB buffer are printed as a zero-terminated string
34 after the system call is done.
39 options are similar, but
41 formats the data as hexadecimal bytes, while
43 interprets the data as a
45 message and formats it similar to the style of
50 with extra detail about the modify and access times.
52 Write a string to standard output:
55 syscall write 1 hello 5
58 Print information about the file connected to standard input:
61 syscall -s fstat 0 buf 1024
64 .B /sys/src/cmd/syscall
66 Section 2 of this manual.
74 If the system call succeeds, the exit status is null;
75 otherwise the exit status is the string that