diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-09-20 20:52:11 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-09-20 20:52:11 +0000 |
commit | 4e9408f19825cf62714518d8932f18563b44cd7b (patch) | |
tree | a6b52feaebb23e89ad560dfbf6a01b67e80c9b11 /lib/libc/arch/mips | |
parent | bca0bac323557ad790813fb7c2d4e2539df9193d (diff) |
Add PSEUDO_NOERROR similar to that used by NetBSD.
Some ports were setting errno in PSEUDO and some were not. Now errno
is set for all in PSEUDO and PSEUDO_NOERROR is provided for the
non-errno case (only used by _exit).
Needs testing on vax and m88k.
XXX - hppa and powerpc still lack a real PSEUDO_NOERROR implementation.
Currently PSEUDO_NOERROR and PSEUDO are the same (so builds don't
break on those platforms).
Diffstat (limited to 'lib/libc/arch/mips')
-rw-r--r-- | lib/libc/arch/mips/SYS.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/libc/arch/mips/SYS.h b/lib/libc/arch/mips/SYS.h index f8a57c29cb8..89ff3f8e1b0 100644 --- a/lib/libc/arch/mips/SYS.h +++ b/lib/libc/arch/mips/SYS.h @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: SYS.h,v 1.6 2001/08/12 12:03:01 heko Exp $ + * $OpenBSD: SYS.h,v 1.7 2001/09/20 20:52:09 millert Exp $ */ #include <sys/syscall.h> @@ -57,13 +57,19 @@ # define __CLABEL2(p,x) _C_LABEL(p/**/x) #endif +#define __PSEUDO_NOERROR(p,x,y) \ + __LEAF2(p,x); \ + __DO_SYSCALL(y); \ + j ra; \ + __END2(p,x) + #define __PSEUDO(p,x,y) \ __LEAF2(p,x); \ __DO_SYSCALL(y); \ - bne a3,zero,err; \ - j ra; \ + bne a3,zero,err; \ + j ra; \ err: la t9,_C_LABEL(cerror); \ - jr t9; \ + jr t9; \ __END2(p,x) #define __RSYSCALL(p,x) __PSEUDO(p,x,x) |