1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
2002-07-02  H.J. Lu  <hjl@gnu.org>

	* sysdeps/mips/atomicity.h: Don't include <sgidefs.h>.  Always
	use ll/sc.
	* sysdeps/unix/sysv/linux/mips/sys/tas.h: Likewise.

	* sysdeps/unix/sysv/linux/configure.in: Set arch_minimum_kernel
	to 2.4.0 for mips.

	TLS fail if USE_TLS is not defined.
This commit is contained in:
Ulrich Drepper
2002-07-16 01:02:04 +00:00
parent 807bce82b3
commit a99bfa85d8
8 changed files with 36 additions and 72 deletions

View File

@ -21,8 +21,6 @@
#define _SYS_TAS_H 1
#include <features.h>
#include <sgidefs.h>
#include <sys/sysmips.h>
__BEGIN_DECLS
@ -34,8 +32,6 @@ 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
{
@ -44,10 +40,13 @@ _test_and_set (int *p, int v) __THROW
__asm__ __volatile__
("/* Inline test and set */\n"
"1:\n\t"
".set push\n\t"
".set mips2\n\t"
"ll %0,%3\n\t"
"move %1,%4\n\t"
"beq %0,%4,2f\n\t"
"sc %1,%2\n\t"
".set pop\n\t"
"beqz %1,1b\n"
"2:\n\t"
"/* End test and set */"
@ -58,16 +57,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