diff options
Diffstat (limited to 'libc/sysdeps')
-rw-r--r-- | libc/sysdeps/linux/common/getdents.c | 1 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/getdents64.c | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/mmap64.c | 1 | ||||
-rw-r--r-- | libc/sysdeps/linux/hppa/bits/setjmp.h | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/mips/sys/tas.h | 33 |
5 files changed, 13 insertions, 26 deletions
diff --git a/libc/sysdeps/linux/common/getdents.c b/libc/sysdeps/linux/common/getdents.c index 623041866..876420664 100644 --- a/libc/sysdeps/linux/common/getdents.c +++ b/libc/sysdeps/linux/common/getdents.c @@ -26,7 +26,6 @@ #include <unistd.h> #include <sys/param.h> #include <sys/types.h> -#include "sysdep.h" #include <sys/syscall.h> diff --git a/libc/sysdeps/linux/common/getdents64.c b/libc/sysdeps/linux/common/getdents64.c index 7b4c0d4ce..e45d9d364 100644 --- a/libc/sysdeps/linux/common/getdents64.c +++ b/libc/sysdeps/linux/common/getdents64.c @@ -25,7 +25,6 @@ #include <stdint.h> #include <string.h> #include <unistd.h> -#include "sysdep.h" #include <sys/param.h> #include <sys/types.h> #include <sys/syscall.h> @@ -110,4 +109,3 @@ ssize_t attribute_hidden __getdents64 (int fd, char *buf, size_t nbytes) return(__getdents(fd, buf, nbytes)); } #endif /* __UCLIBC_HAS_LFS__ */ - diff --git a/libc/sysdeps/linux/common/mmap64.c b/libc/sysdeps/linux/common/mmap64.c index 969e1e227..7f329c6c9 100644 --- a/libc/sysdeps/linux/common/mmap64.c +++ b/libc/sysdeps/linux/common/mmap64.c @@ -22,7 +22,6 @@ #include <features.h> #include <errno.h> #include <unistd.h> -#include "sysdep.h" #include <sys/mman.h> diff --git a/libc/sysdeps/linux/hppa/bits/setjmp.h b/libc/sysdeps/linux/hppa/bits/setjmp.h index 253e92603..4395b8f56 100644 --- a/libc/sysdeps/linux/hppa/bits/setjmp.h +++ b/libc/sysdeps/linux/hppa/bits/setjmp.h @@ -40,6 +40,6 @@ typedef double __jmp_buf[21]; /* Test if longjmp to JMPBUF would unwind the frame containing a local variable at ADDRESS. */ #define _JMPBUF_UNWINDS(_jmpbuf, _address) \ - ((void *)(_address) > (void *)(_jmpbuf[JB_SP])) + ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP])) #endif /* bits/setjmp.h */ diff --git a/libc/sysdeps/linux/mips/sys/tas.h b/libc/sysdeps/linux/mips/sys/tas.h index 0c81dc2de..1183b867b 100644 --- a/libc/sysdeps/linux/mips/sys/tas.h +++ b/libc/sysdeps/linux/mips/sys/tas.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000. @@ -22,7 +22,6 @@ #include <features.h> #include <sgidefs.h> -#include <sys/sysmips.h> __BEGIN_DECLS @@ -34,24 +33,26 @@ extern int _test_and_set (int *p, int v) __THROW; # define _EXTERN_INLINE extern __inline # endif -# if (_MIPS_ISA >= _MIPS_ISA_MIPS2) - _EXTERN_INLINE int -_test_and_set (int *p, int v) __THROW +__NTH (_test_and_set (int *p, int v)) { int r, t; __asm__ __volatile__ - ("1:\n\t" - "ll %0,%3\n\t" + ("/* Inline test and set */\n" + "1:\n\t" ".set push\n\t" - ".set noreorder\n\t" +#if _MIPS_SIM == _ABIO32 + ".set mips2\n\t" +#endif + "ll %0,%3\n\t" + "move %1,%4\n\t" "beq %0,%4,2f\n\t" - " move %1,%4\n\t" - ".set pop\n\t" "sc %1,%2\n\t" + ".set pop\n\t" "beqz %1,1b\n" - "2:\n" + "2:\n\t" + "/* End test and set */" : "=&r" (r), "=&r" (t), "=m" (*p) : "m" (*p), "r" (v) : "memory"); @@ -59,16 +60,6 @@ _test_and_set (int *p, int v) __THROW return r; } -# else /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ - -_EXTERN_INLINE int -_test_and_set (int *p, int v) __THROW -{ - return sysmips (MIPS_ATOMIC_SET, (int) p, v, 0); -} - -# endif /* !(_MIPS_ISA >= _MIPS_ISA_MIPS2) */ - #endif /* __USE_EXTERN_INLINES */ __END_DECLS |