--- Now taking into account the pthreads fallback for atomics.
configure | 1 + libavutil/atomic.c | 14 +++----------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 8cf25ab..777b284 100755 --- a/configure +++ b/configure @@ -1590,6 +1590,7 @@ atomics_gcc_if="sync_val_compare_and_swap" atomics_suncc_if="atomic_cas_ptr machine_rw_barrier" atomics_win32_if="MemoryBarrier" atomics_native_if_any="$ATOMICS_LIST" +threads_if_any="atomics_native pthreads" threads_if_any="$THREADS_LIST" # subsystems diff --git a/libavutil/atomic.c b/libavutil/atomic.c index e4fa957..4fe3b19 100644 --- a/libavutil/atomic.c +++ b/libavutil/atomic.c @@ -21,9 +21,7 @@ #include "config.h" #include "atomic.h" -#if !HAVE_ATOMICS_NATIVE - -#if HAVE_PTHREADS +#if !HAVE_ATOMICS_NATIVE && HAVE_PTHREADS #include <pthread.h> @@ -70,7 +68,7 @@ void *avpriv_atomic_ptr_cas(void * volatile *ptr, void *oldval, void *newval) return ret; } -#elif !HAVE_THREADS +#else int avpriv_atomic_int_get(volatile int *ptr) { @@ -97,13 +95,7 @@ void *avpriv_atomic_ptr_cas(void * volatile *ptr, void *oldval, void *newval) return *ptr; } -#else - -#error "Threading is enabled, but there is no implementation of atomic operations available" - -#endif /* HAVE_PTHREADS */ - -#endif /* !HAVE_ATOMICS_NATIVE */ +#endif /* !HAVE_ATOMICS_NATIVE && HAVE_PTHREADS */ #ifdef TEST #include <assert.h> -- 1.8.3.2 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel