diff src/atomic/SDL_spinlock.c @ 5071:55ff76cdbbb8

HAVE_GCC_ATOMICS covers the test and set
author Sam Lantinga <slouken@libsdl.org>
date Fri, 21 Jan 2011 21:45:55 -0800
parents fd125217f00c
children 1e94e68525d5
line wrap: on
line diff
--- a/src/atomic/SDL_spinlock.c	Fri Jan 21 21:43:56 2011 -0800
+++ b/src/atomic/SDL_spinlock.c	Fri Jan 21 21:45:55 2011 -0800
@@ -36,7 +36,7 @@
 #elif defined(__MACOSX__)
     return OSAtomicCompareAndSwap32Barrier(0, 1, lock);
 
-#elif defined(HAVE_GCC_SYNC_LOCK_TEST_AND_SET)
+#elif defined(HAVE_GCC_ATOMICS) || defined(HAVE_GCC_SYNC_LOCK_TEST_AND_SET)
     return (__sync_lock_test_and_set(lock, 1) == 0);
 
 #elif defined(__GNUC__) && defined(__arm__) && defined(__ARM_ARCH_5__)