summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-01-03 01:11:11 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-01-03 01:11:11 +0000
commitd2f5bc52e176c7227253c2705c38bd2ac7dc8047 (patch)
tree59e178d9caf7060d2ae8763c2c4ac3c4b6fb1e6a /lib/libc
parent478afbc291e34a5bfe321fb584defb69fd8e76c8 (diff)
Always have the real entry point to the syscall called _thread_sys_
and provide the real name as a weak alias. This is the last piece needed for libc_r on sparc64 (plus debugging).
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/arch/sparc64/SYS.h23
1 files changed, 3 insertions, 20 deletions
diff --git a/lib/libc/arch/sparc64/SYS.h b/lib/libc/arch/sparc64/SYS.h
index 827b437e0ea..467194f0e47 100644
--- a/lib/libc/arch/sparc64/SYS.h
+++ b/lib/libc/arch/sparc64/SYS.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: SYS.h,v 1.5 2001/09/26 23:02:10 drahn Exp $ */
+/* $OpenBSD: SYS.h,v 1.6 2002/01/03 01:11:10 art Exp $ */
/*-
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
@@ -47,12 +47,12 @@
#ifdef __STDC__
#define _CAT(x,y) x##y
-#define __ENTRY(p,x) ENTRY(p##x)
#else
#define _CAT(x,y) x/**/y
-#define __ENTRY(p,x) ENTRY(p/**/x)
#endif
+#define __ENTRY(p,x) ENTRY(_CAT(p,x)) ; .weak x; x = _CAT(p,x)
+
/*
* ERROR branches to cerror. This is done with a macro so that I can
* change it to be position independent later, if need be.
@@ -132,26 +132,9 @@
*/
#define __SYSENTRY(p,x) __ENTRY(p,x)
-#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 RSYSCALL(x) __RSYSCALL(_thread_sys_,x)
#define RSYSCALL_NOERROR(x,y) __RSYSCALL_NOERROR(_thread_sys_,x,y)
#define PSEUDO(x,y) __PSEUDO(_thread_sys_,x,y)
#define PSEUDO_NOERROR(x,y) __PSEUDO_NOERROR(_thread_sys_,x,y)
#define SYSENTRY(x) __SYSENTRY(_thread_sys_,x)
-#else /* _THREAD_SAFE */
-/*
- * The non-threaded library defaults to traditional syscalss where
- * the function name matches the syscall name.
- */
-#define SYSCALL(x) __SYSCALL(,x)
-#define RSYSCALL(x) __RSYSCALL(,x)
-#define RSYSCALL_NOERROR(x,y) __RSYSCALL_NOERROR(,x,y)
-#define PSEUDO(x,y) __PSEUDO(,x,y)
-#define PSEUDO_NOERROR(x,y) __PSEUDO_NOERROR(,x,y)
-#define SYSENTRY(x) __SYSENTRY(,x)
-#endif /* _THREAD_SAFE */