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 ebbe32c4f256d9eea4056c3381759928d43d0507..0abd2b2e871994cafe0d063f502d3471e39953a6 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