summaryrefslogtreecommitdiffstats
path: root/lib/libc/ia64
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/ia64')
-rw-r--r--lib/libc/ia64/SYS.h33
-rw-r--r--lib/libc/ia64/gen/_setjmp.S10
-rw-r--r--lib/libc/ia64/gen/modf.c1
-rw-r--r--lib/libc/ia64/gen/setjmp.S17
-rw-r--r--lib/libc/ia64/gen/sigsetjmp.S10
5 files changed, 15 insertions, 56 deletions
diff --git a/lib/libc/ia64/SYS.h b/lib/libc/ia64/SYS.h
index 303b50e..1cbc970 100644
--- a/lib/libc/ia64/SYS.h
+++ b/lib/libc/ia64/SYS.h
@@ -75,50 +75,35 @@ END(label);
* Design note:
*
* The macros PSYSCALL() and PRSYSCALL() are intended for use where a
- * syscall needs to be renamed in the threaded library. When building
- * a normal library, they default to the traditional SYSCALL() and
- * RSYSCALL(). This avoids the need to #ifdef _THREAD_SAFE everywhere
- * that the renamed function needs to be called.
+ * syscall needs to be renamed in the threaded library.
*/
-#ifdef _THREAD_SAFE
/*
- * For the thread_safe versions, we prepend _thread_sys_ to the function
+ * For the thread_safe versions, we prepend __sys_ to the function
* name so that the 'C' wrapper can go around the real name.
*/
#define PCALL(name) \
- CALL(_thread_sys_ ## name)
+ CALL(__sys_ ## name)
#define PENTRY(name, args) \
-ENTRY(_thread_sys_ ## name,args)
+ENTRY(__sys_ ## name,args)
#define PEND(name) \
-END(_thread_sys_ ## name)
+END(__sys_ ## name)
#define PSYSCALL(name) \
PENTRY(name,0); /* XXX # of args? */ \
CALLSYS_ERROR(name)
#define PRSYSCALL(name) \
-PENTRY(name,0); /* XXX # of args? */ \
+PENTRY(_sys_ ## name,0); /* XXX # of args? */ \
+ WEAK_ALIAS(name, __sys_ ## name); \
+ WEAK_ALIAS(_ ## name, __sys_ ## name); \
CALLSYS_ERROR(name) \
br.ret.sptk.few rp; \
PEND(name)
#define PPSEUDO(label,name) \
-PENTRY(label,0); /* XXX # of args? */ \
+PENTRY(label,0); /* XXX # of args? */ \
CALLSYS_ERROR(name); \
br.ret.sptk.few rp; \
PEND(label)
-
-#else
-/*
- * The non-threaded library defaults to traditional syscalls where
- * the function name matches the syscall name.
- */
-#define PSYSCALL(x) SYSCALL(x)
-#define PRSYSCALL(x) RSYSCALL(x)
-#define PPSEUDO(x,y) PSEUDO(x,y)
-#define PENTRY(x,y) ENTRY(x,y)
-#define PEND(x) END(x)
-#define PCALL(x) CALL(x)
-#endif
diff --git a/lib/libc/ia64/gen/_setjmp.S b/lib/libc/ia64/gen/_setjmp.S
index 5baf3ff..cd2482f 100644
--- a/lib/libc/ia64/gen/_setjmp.S
+++ b/lib/libc/ia64/gen/_setjmp.S
@@ -90,12 +90,8 @@ ENTRY(_setjmp, 1)
#endif
END(_setjmp)
-#ifdef _THREAD_SAFE
+XENTRY(_longjmp)
ENTRY(___longjmp, 2)
-#else
-XENTRY(___longjmp)
-ENTRY(_longjmp, 2)
-#endif
#if 0
LDGP(pv)
ldq t0, ((31 + 4) * 8)(a0) /* magic in sc_regs[31] */
@@ -132,8 +128,4 @@ botch:
CALL(abort)
RET /* "can't" get here... */
#endif
-#ifdef _THREAD_SAFE
END(___longjmp)
-#else
-END(_longjmp)
-#endif
diff --git a/lib/libc/ia64/gen/modf.c b/lib/libc/ia64/gen/modf.c
index 42c79cf..0dae657 100644
--- a/lib/libc/ia64/gen/modf.c
+++ b/lib/libc/ia64/gen/modf.c
@@ -30,7 +30,6 @@
#include <sys/types.h>
#include <machine/ieee.h>
-#include <errno.h>
#include <math.h>
/*
diff --git a/lib/libc/ia64/gen/setjmp.S b/lib/libc/ia64/gen/setjmp.S
index f1c5399..e61850a 100644
--- a/lib/libc/ia64/gen/setjmp.S
+++ b/lib/libc/ia64/gen/setjmp.S
@@ -69,12 +69,12 @@ ENTRY(setjmp, 1)
lda a2, (71 * 8)(a0) /* oset: sc_reserved */
mov zero, a1 /* set: NULL */
addq a1, 1, a0 /* how: SIG_BLOCK */
- PCALL(sigprocmask) /* see what's blocked */
+ CALL(_sigprocmask) /* see what's blocked */
lda sp, -24(sp) /* sizeof struct sigaltstack */
mov zero, a0
mov sp, a1
- PCALL(sigaltstack)
+ CALL(_sigaltstack)
ldl t0, 16(sp) /* offset of ss_flags */
lda sp, 24(sp) /* sizeof struct sigaltstack */
ldq ra, ((26 + 4) * 8)(s0) /* restore return address */
@@ -119,24 +119,15 @@ ENTRY(setjmp, 1)
#endif
END(setjmp)
-#ifdef _THREAD_SAFE
+XENTRY(longjmp)
ENTRY(__longjmp, 2)
-#else
-XENTRY(__longjmp)
-ENTRY(longjmp, 2)
-#endif
#if 0
LDGP(pv)
stq a1, (( 0 + 4) * 8)(a0) /* save return value */
- PCALL(sigreturn) /* use sigreturn to return */
+ PCALL(_sigreturn) /* use sigreturn to return */
botch:
CALL(longjmperror)
CALL(abort)
RET /* "can't" get here... */
-#endif
-#ifdef _THREAD_SAFE
END(__longjmp)
-#else
-END(longjmp)
-#endif
diff --git a/lib/libc/ia64/gen/sigsetjmp.S b/lib/libc/ia64/gen/sigsetjmp.S
index a941978..8ef32cc 100644
--- a/lib/libc/ia64/gen/sigsetjmp.S
+++ b/lib/libc/ia64/gen/sigsetjmp.S
@@ -55,12 +55,8 @@ Lsavesig:
#endif
END(sigsetjmp)
-#ifdef _THREAD_SAFE
+XENTRY(siglongjmp)
ENTRY(__siglongjmp, 2)
-#else
-XENTRY(__siglongjmp)
-ENTRY(siglongjmp, 2)
-#endif
#if 0
LDGP(pv)
ldq t0, (81 * 8)(a0) /* get the mask */
@@ -69,8 +65,4 @@ ENTRY(siglongjmp, 2)
Lrestoresig:
jmp zero, longjmp
#endif
-#ifdef _THREAD_SAFE
END(__siglongjmp)
-#else
-END(siglongjmp)
-#endif
OpenPOWER on IntegriCloud