summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/mips/syscall_error.S
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2010-06-30 04:10:37 -0700
committerKhem Raj <raj.khem@gmail.com>2010-06-30 04:10:37 -0700
commit8b48f745be1e086d6e486bbb8167e770f3d1fbc5 (patch)
tree80c28e847e50575b42a8a04ecebfd535d6d200f0 /libc/sysdeps/linux/mips/syscall_error.S
parent913b76abdd824ee3a6dbbc1527470ebcb8c06a65 (diff)
mips/syscall-error: Choose the correct version for setting up errno.
* Current function is a C protype and PSEUDO macro does not transfer syscall return parameters to correct argument registers for a C function. This causes problem with syscalls setting wrong value for errno when they encounter an error. * Fixes PR/2089 for mips/nptl Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/mips/syscall_error.S')
-rw-r--r--libc/sysdeps/linux/mips/syscall_error.S8
1 files changed, 5 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/mips/syscall_error.S b/libc/sysdeps/linux/mips/syscall_error.S
index 1e348ad4a..51a8efa5a 100644
--- a/libc/sysdeps/linux/mips/syscall_error.S
+++ b/libc/sysdeps/linux/mips/syscall_error.S
@@ -22,7 +22,7 @@
#include <sysdep.h>
#include <bits/errno.h>
-#ifdef __UCLIBC_HAS_THREADS__
+#ifdef _LIBC_REENTRANT
LOCALSZ= 3
FRAMESZ= (((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK
@@ -61,12 +61,14 @@ ENTRY(__syscall_error)
j ra
END(__syscall_error)
-#else /* __UCLIBC_HAS_THREADS__ */
+#else /* __LIBC_REENTRANT */
ENTRY(__syscall_error)
#ifdef __PIC__
+ .set noat
SETUP_GPX (AT)
+ .set at
#endif
SETUP_GPX64 (t9, AT)
@@ -79,4 +81,4 @@ ENTRY(__syscall_error)
RESTORE_GP64
j ra
END(__syscall_error)
-#endif /* __UCLIBC_HAS_THREADS__ */
+#endif /* _LIBC_REENTRANT*/