diff options
author | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1998-12-23 05:39:46 +0000 |
---|---|---|
committer | Dale S. Rahn <rahnds@cvs.openbsd.org> | 1998-12-23 05:39:46 +0000 |
commit | 493035fca222ad926a8fcefbb7709f58a67da27b (patch) | |
tree | d659eb78b6ed72d4f99e90ade3b3bd4b947806c5 | |
parent | 5731d282d0210a2351c19f08d694c10276e3a6df (diff) |
_thread_sys changes for powerpc SYS.h, code mostly from d, fixed up
and completed for checkin.
-rw-r--r-- | lib/libc/arch/powerpc/SYS.h | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/lib/libc/arch/powerpc/SYS.h b/lib/libc/arch/powerpc/SYS.h index f4e94d4a508..4e90914706a 100644 --- a/lib/libc/arch/powerpc/SYS.h +++ b/lib/libc/arch/powerpc/SYS.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)SYS.h 8.1 (Berkeley) 6/4/93 - * $Id: SYS.h,v 1.2 1998/07/04 23:57:40 rahnds Exp $ + * $Id: SYS.h,v 1.3 1998/12/23 05:39:45 rahnds Exp $ */ #include <sys/syscall.h> @@ -45,13 +45,15 @@ #include "machine/asm.h" #ifdef __STDC__ -#define PSEUDO_PREFIX(x,y) .extern cerror ; \ - ENTRY(x) \ +#define _CONCAT(x,y) x##y +#define PSEUDO_PREFIX(p,x,y) .extern cerror ; \ + ENTRY(p##x) \ li 0, SYS_##y ; \ /* sc */ #else /* !__STDC__ */ -#define PSEUDO_PREFIX(x,y) .extern cerror ; \ - ENTRY(x) \ +#define _CONCAT(x,y) x/**/y +#define PSEUDO_PREFIX(p,x,y) .extern cerror ; \ + ENTRY(p/**/x) \ li 0, SYS_/**/y ; \ /* sc */ #endif /* !__STDC__ */ @@ -59,12 +61,25 @@ beqlr+ ; \ b cerror -#define PREFIX(x) PSEUDO_PREFIX(x,x) #define SUFFIX PSEUDO_SUFFIX -#define PSEUDO(x,y) PSEUDO_PREFIX(x,y) ; \ +#ifndef _THREAD_SAFE +#define PREFIX(x) PSEUDO_PREFIX(,x,x) +#define PREFIX2(x,y) PSEUDO_PREFIX(,x,y) +#define PSEUDO(x,y) PSEUDO_PREFIX(,x,y) ; \ sc ; \ PSEUDO_SUFFIX #define RSYSCALL(x) PSEUDO(x,x) +#else /* _THREAD_SAFE */ +#define PREFIX(x) PSEUDO_PREFIX(_thread_sys_,x,x) +#define PREFIX2(x,y) PSEUDO_PREFIX(_thread_sys_,x,y) +#define PSEUDO(x,y) PSEUDO_PREFIX(_thread_sys_,x,y) ; \ + sc ; \ + PSEUDO_SUFFIX + +#define RSYSCALL(x) PSEUDO(x,x) +#define PASSTHRU(x) ENTRY(x) b _CONCAT(_thread_sys_,x) + +#endif /* _THREAD_SAFE */ |