1
/* ==== syscall.S ============================================================
2
* Copyright (c) 1994 Chris Provenzano, proven@mit.edu
12
#include <sys/syscall.h>
15
.globl _machdep_sys_##x; \
27
* Initial asm stuff for all functions.
32
/* ==========================================================================
33
* error code for all syscalls. The error value is returned as the negative
43
/* ==========================================================================
46
.globl _machdep_sys_pipe
59
/* ==========================================================================
62
.globl _machdep_sys_fork;
76
/* POSIX-compliant getpgrp() takes no arguments. The SunOS syscall wants
77
one, and gives the POSIXy result if that argument is zero. */
89
/* I think this bit of magic will do the right thing for other syscalls.
90
We get here with the new `errno' code in %o0. It should get stored in
91
*__error(), and -1 returned to the caller. */
95
/* Now value is in %i0. Store it in *__error(). */
100
/* Now also store a copy in global variable errno, for routines
101
like isatty that want to examine it and which haven't been
103
sethi %hi(_errno), %o0
104
st %i0,[%o0+%lo(_errno)]
106
#if 0 /* use this if you want -errno returned */
108
#else /* return -1 */