Commit daecbfdc authored by Sam Lantinga's avatar Sam Lantinga

HAVE_GCC_ATOMICS covers the test and set

parent b3e14d43
......@@ -311,8 +311,7 @@ if test x$enable_gcc_atomics = xyes; then
if test x$have_gcc_atomics = xyes; then
AC_DEFINE(HAVE_GCC_ATOMICS)
fi
else
# See if we have the minimum operation needed for GCC atomics
AC_TRY_LINK([
],[
......@@ -324,6 +323,7 @@ if test x$enable_gcc_atomics = xyes; then
if test x$have_gcc_sync_lock_test_and_set = xyes; then
AC_DEFINE(HAVE_GCC_SYNC_LOCK_TEST_AND_SET)
fi
fi
fi
# Standard C sources
......
......@@ -44,7 +44,6 @@ typedef unsigned long uintptr_t;
#define SDL_HAS_64BIT_TYPE 1
#define HAVE_GCC_ATOMICS 1
#define HAVE_GCC_SYNC_LOCK_TEST_AND_SET 1
#define HAVE_ALLOCA_H 1
#define HAVE_SYS_TYPES_H 1
......
......@@ -36,7 +36,7 @@ SDL_AtomicTryLock(SDL_SpinLock *lock)
#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__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment