Only use _ReadWriteBarrier on MSVC
authorGary Linscott <glinscott@gmail.com>
Thu, 11 Dec 2014 19:56:24 +0000 (14:56 -0500)
committerGary Linscott <glinscott@gmail.com>
Thu, 11 Dec 2014 19:56:24 +0000 (14:56 -0500)
It was causing compile errors when cross-compiling using mingw.

No functional change.

src/syzygy/tbprobe.cpp

index ebbe32c..0abd2b2 100644 (file)
@@ -146,8 +146,8 @@ static int probe_wdl_table(Position& pos, int *success)
         return 0;
       }
       // Memory barrier to ensure ptr->ready = 1 is not reordered.
-#ifdef _WIN32
-         _ReadWriteBarrier();
+#ifdef _MSC_VER
+      _ReadWriteBarrier();
 #else
       __asm__ __volatile__ ("" ::: "memory");
 #endif