Separated out the minimum functionality that we need from gcc for our spinlock fallback.

This commit is contained in:
Sam Lantinga 2011-01-21 21:42:04 -08:00
parent 68afef61c9
commit 2c31531800
3 changed files with 14 additions and 1 deletions

View file

@ -36,7 +36,7 @@ SDL_AtomicTryLock(SDL_SpinLock *lock)
#elif defined(__MACOSX__)
return OSAtomicCompareAndSwap32Barrier(0, 1, lock);
#elif defined(HAVE_GCC_ATOMICS)
#elif 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__)