Browse Source

threads: Check w32threads dependencies at the configure stage

Also add warning comment about threading implementations without matching
atomics implementation to the atomics fallback implementation.
tags/n2.2-rc1
Diego Biurrun 12 years ago
parent
commit
874c751cc5
2 changed files with 5 additions and 1 deletions
  1. +1
    -0
      configure
  2. +4
    -1
      libavutil/atomic.c

+ 1
- 0
configure View File

@@ -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


+ 4
- 1
libavutil/atomic.c View File

@@ -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 */


Loading…
Cancel
Save