Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
daecbfdc
Commit
daecbfdc
authored
Jan 22, 2011
by
Sam Lantinga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HAVE_GCC_ATOMICS covers the test and set
parent
b3e14d43
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
14 deletions
+13
-14
configure.in
configure.in
+12
-12
SDL_config_iphoneos.h
include/SDL_config_iphoneos.h
+0
-1
SDL_spinlock.c
src/atomic/SDL_spinlock.c
+1
-1
No files found.
configure.in
View file @
daecbfdc
...
...
@@ -311,18 +311,18 @@ if test x$enable_gcc_atomics = xyes; then
if test x$have_gcc_atomics = xyes; then
AC_DEFINE(HAVE_GCC_ATOMICS)
fi
# See if we have the minimum operation needed for GCC atomics
AC_TRY_LINK(
[
],[
int a
;
__sync_lock_test_and_set(&a, 1);
],[
have_gcc_sync_lock_test_and_set=yes
])
if test x$have_gcc_sync_lock_test_and_set = xyes; then
AC_DEFINE(HAVE_GCC_SYNC_LOCK_TEST_AND_SET)
else
# See if we have the minimum operation needed for GCC atomics
AC_TRY_LINK([
],
[
int a;
__sync_lock_test_and_set(&a, 1)
;
],[
have_gcc_sync_lock_test_and_set=yes
])
if test x$have_gcc_sync_lock_test_and_set = xyes; then
AC_DEFINE(HAVE_GCC_SYNC_LOCK_TEST_AND_SET)
fi
fi
fi
...
...
include/SDL_config_iphoneos.h
View file @
daecbfdc
...
...
@@ -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
...
...
src/atomic/SDL_spinlock.c
View file @
daecbfdc
...
...
@@ -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__)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment