[FFmpeg-cvslog] threads: Check w32threads dependencies at the configure stage
Diego Biurrun
git at videolan.org
Wed Feb 19 21:58:53 CET 2014
ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Wed Dec 18 22:29:25 2013 +0100| [874c751cc5b99cd68932e21c2c3a0d21134207e0] | committer: Diego Biurrun
threads: Check w32threads dependencies at the configure stage
Also add warning comment about threading implementations without matching
atomics implementation to the atomics fallback implementation.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=874c751cc5b99cd68932e21c2c3a0d21134207e0
---
configure | 1 +
libavutil/atomic.c | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 292da47..841c39a 100755
--- a/configure
+++ b/configure
@@ -1606,6 +1606,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"
+w32threads_deps="atomics_native"
threads_if_any="$THREADS_LIST"
# subsystems
diff --git a/libavutil/atomic.c b/libavutil/atomic.c
index e4fa957..8374039 100644
--- a/libavutil/atomic.c
+++ b/libavutil/atomic.c
@@ -97,8 +97,11 @@ void *avpriv_atomic_ptr_cas(void * volatile *ptr, void *oldval, void *newval)
return *ptr;
}
-#else
+#else /* HAVE_THREADS */
+/* This should never trigger, unless a new threading implementation
+ * without correct atomics dependencies in configure or a corresponding
+ * atomics implementation is added. */
#error "Threading is enabled, but there is no implementation of atomic operations available"
#endif /* HAVE_PTHREADS */
More information about the ffmpeg-cvslog
mailing list