atomic: prefer gcc builtins over win32 atomics, if available.
authorHendrik Leppkes <h.leppkes@gmail.com>
Sun, 10 Mar 2013 22:03:42 +0000 (23:03 +0100)
committerMartin Storsjö <martin@martin.st>
Mon, 11 Mar 2013 14:57:25 +0000 (16:57 +0200)
The mingw win32 atomics appear to be faulty, so they should not be used
if the gcc ones are available.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavutil/atomic.h

index 577e471..773c5df 100644 (file)
 
 #include "config.h"
 
-#if HAVE_MEMORYBARRIER
-#include "atomic_win32.h"
-#elif HAVE_SYNC_VAL_COMPARE_AND_SWAP
+#if HAVE_SYNC_VAL_COMPARE_AND_SWAP
 #include "atomic_gcc.h"
+#elif HAVE_MEMORYBARRIER
+#include "atomic_win32.h"
 #elif HAVE_MACHINE_RW_BARRIER
 #include "atomic_suncc.h"
 #else