summaryrefslogtreecommitdiff
path: root/lib/libc/arch/alpha
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2002-01-04 21:37:19 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2002-01-04 21:37:19 +0000
commit16079fc29265098e313e9fd3edfab551017d1fbf (patch)
tree0fbcd90f6bde3223f39c21b85e84079b8568cd40 /lib/libc/arch/alpha
parente5b345a3523400e9851f9c51e60af83ad79ce1bd (diff)
system calls are made thru _thread_sys_* with weak symbols of the real name
pointing to the _thread_sys_ version. ok pval, fgs
Diffstat (limited to 'lib/libc/arch/alpha')
-rw-r--r--lib/libc/arch/alpha/SYS.h39
1 files changed, 16 insertions, 23 deletions
diff --git a/lib/libc/arch/alpha/SYS.h b/lib/libc/arch/alpha/SYS.h
index 98565c16963..64b4c91cc2f 100644
--- a/lib/libc/arch/alpha/SYS.h
+++ b/lib/libc/arch/alpha/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.7 2001/09/20 20:52:09 millert Exp $ */
+/* $OpenBSD: SYS.h,v 1.8 2002/01/04 21:37:18 drahn Exp $ */
/* $NetBSD: SYS.h,v 1.4 1996/10/17 03:03:53 cgd Exp $ */
/*
@@ -78,31 +78,24 @@ __LEAF(p,label,0); /* XXX # of args? */ \
RET; \
__END(p,label);
+#define ALIAS(prefix,name) WEAK_ALIAS(name, ___CONCAT(prefix,name));
-#ifdef _THREAD_SAFE
/*
* For the thread_safe versions, we prepend _thread_sys_ to the function
* name so that the 'C' wrapper can go around the real name.
*/
-# define SYSCALL(x) __SYSCALL(_thread_sys_,x)
-# define SYSCALL_NOERROR(x) __SYSCALL_NOERROR(_thread_sys_,x)
-# define RSYSCALL(x) __RSYSCALL(_thread_sys_,x)
-# define RSYSCALL_NOERROR(x) __RSYSCALL_NOERROR(_thread_sys_,x)
-# define PSEUDO(x,y) __PSEUDO(_thread_sys_,x,y)
-# define PSEUDO_NOERROR(x,y) __PSEUDO_NOERROR(_thread_sys_,x,y)
-# define SYSLEAF(x,e) __LEAF(_thread_sys_,x,e)
+# define SYSCALL(x) ALIAS(_thread_sys_,x) \
+ __SYSCALL(_thread_sys_,x)
+# define SYSCALL_NOERROR(x) ALIAS(_thread_sys_,x) \
+ __SYSCALL_NOERROR(_thread_sys_,x)
+# define RSYSCALL(x) ALIAS(_thread_sys_,x) \
+ __RSYSCALL(_thread_sys_,x)
+# define RSYSCALL_NOERROR(x) ALIAS(_thread_sys_,x) \
+ __RSYSCALL_NOERROR(_thread_sys_,x)
+# define PSEUDO(x,y) ALIAS(_thread_sys_,x) \
+ __PSEUDO(_thread_sys_,x,y)
+# define PSEUDO_NOERROR(x,y) ALIAS(_thread_sys_,x) \
+ __PSEUDO_NOERROR(_thread_sys_,x,y)
+# define SYSLEAF(x,e) ALIAS(_thread_sys_,x) \
+ __LEAF(_thread_sys_,x,e)
# define SYSEND(x) __END(_thread_sys_,x)
-#else /* _THREAD_SAFE */
-/*
- * The non-threaded library defaults to traditional syscalls where
- * the function name matches the syscall name.
- */
-# define SYSCALL(x) __SYSCALL(,x)
-# define SYSCALL_NOERROR(x) __SYSCALL_NOERROR(,x)
-# define RSYSCALL(x) __RSYSCALL(,x)
-# define RSYSCALL_NOERROR(x) __RSYSCALL_NOERROR(,x)
-# define PSEUDO(x,y) __PSEUDO(,x,y)
-# define PSEUDO_NOERROR(x,y) __PSEUDO_NOERROR(,x,y)
-# define SYSLEAF(x,e) __LEAF(,x,e)
-# define SYSEND(x) __END(,x)
-#endif /* _THREAD_SAFE */