summaryrefslogtreecommitdiff
path: root/libavutil/atomic.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-03-08 12:32:38 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-03-12 10:41:02 +0100
commitc48828f763672e45f0b1a20de41fb7ddd744462b (patch)
treef1d4afdd4b5285e18a6b54c7f49b098838f972a3 /libavutil/atomic.c
parentc536253854eadf9ebf5aa0506657f9c24e522e57 (diff)
atomic: Check for __sync_val_compare_and_swap instead of __sync_synchronize
Not all gcc configurations have an implementation of all the atomic operations, and some gcc configurations have some atomic builtins implemented but not all. Thus check for the most essential function, whose presence should indicate that all others are present as well, since it can be used to implement all the other ones. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavutil/atomic.c')
-rw-r--r--libavutil/atomic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavutil/atomic.c b/libavutil/atomic.c
index 55abbab13a..7a701e1598 100644
--- a/libavutil/atomic.c
+++ b/libavutil/atomic.c
@@ -20,7 +20,7 @@
#include "atomic.h"
-#if !HAVE_MEMORYBARRIER && !HAVE_SYNC_SYNCHRONIZE && !HAVE_MACHINE_RW_BARRIER
+#if !HAVE_MEMORYBARRIER && !HAVE_SYNC_VAL_COMPARE_AND_SWAP && !HAVE_MACHINE_RW_BARRIER
#if HAVE_PTHREADS
@@ -102,7 +102,7 @@ void *avpriv_atomic_ptr_cas(void * volatile *ptr, void *oldval, void *newval)
#endif /* HAVE_PTHREADS */
-#endif /* !HAVE_MEMORYBARRIER && !HAVE_SYNC_SYNCHRONIZE && !HAVE_MACHINE_RW_BARRIER */
+#endif /* !HAVE_MEMORYBARRIER && !HAVE_SYNC_VAL_COMPARE_AND_SWAP && !HAVE_MACHINE_RW_BARRIER */
#ifdef TEST
#include <assert.h>