gc_locks.h: For __ARM_EABI__ define GC_test_and_set GC_clear to use the atomic builtins.
2009-12-09 Matthias Klose <doko@ubuntu.com> * include/private/gc_locks.h: For __ARM_EABI__ define GC_test_and_set GC_clear to use the atomic builtins. From-SVN: r155198
This commit is contained in:
parent
38fb287358
commit
840a82bab8
|
@ -1,3 +1,8 @@
|
||||||
|
2009-12-09 Matthias Klose <doko@ubuntu.com>
|
||||||
|
|
||||||
|
* include/private/gc_locks.h: For __ARM_EABI__ define
|
||||||
|
GC_test_and_set GC_clear to use the atomic builtins.
|
||||||
|
|
||||||
2009-12-05 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
2009-12-05 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||||
|
|
||||||
* Makefile.in: Regenerate.
|
* Makefile.in: Regenerate.
|
||||||
|
|
|
@ -207,6 +207,12 @@
|
||||||
# define GC_CLEAR_DEFINED
|
# define GC_CLEAR_DEFINED
|
||||||
# endif /* ALPHA */
|
# endif /* ALPHA */
|
||||||
# ifdef ARM32
|
# ifdef ARM32
|
||||||
|
# define GC_TEST_AND_SET_DEFINED
|
||||||
|
# if (__GNUC__>4)||((__GNUC__==4)&&(__GNUC_MINOR__>=5)) && defined(__ARM_EABI__)
|
||||||
|
# define GC_CLEAR_DEFINED
|
||||||
|
# define GC_test_and_set(addr) __sync_lock_test_and_set (addr, 1)
|
||||||
|
# define GC_clear(addr) __sync_lock_release (addr)
|
||||||
|
# else
|
||||||
inline static int GC_test_and_set(volatile unsigned int *addr) {
|
inline static int GC_test_and_set(volatile unsigned int *addr) {
|
||||||
int oldval;
|
int oldval;
|
||||||
/* SWP on ARM is very similar to XCHG on x86. Doesn't lock the
|
/* SWP on ARM is very similar to XCHG on x86. Doesn't lock the
|
||||||
|
@ -219,7 +225,7 @@
|
||||||
: "memory");
|
: "memory");
|
||||||
return oldval;
|
return oldval;
|
||||||
}
|
}
|
||||||
# define GC_TEST_AND_SET_DEFINED
|
# endif
|
||||||
# endif /* ARM32 */
|
# endif /* ARM32 */
|
||||||
# ifdef CRIS
|
# ifdef CRIS
|
||||||
inline static int GC_test_and_set(volatile unsigned int *addr) {
|
inline static int GC_test_and_set(volatile unsigned int *addr) {
|
||||||
|
|
Loading…
Reference in New Issue