]> git.sesse.net Git - stockfish/blobdiff - src/syzygy/tbprobe.cpp
Sync with master
[stockfish] / src / syzygy / tbprobe.cpp
index 3276be9e8e7a36927eb0eff03efc32bdb1272fd7..126fe91cf779b1d5ff0cd32dd97c1de79bf3a955 100644 (file)
@@ -7,6 +7,10 @@
   this code to other chess engines.
 */
 
+#define NOMINMAX
+
+#include <algorithm>
+
 #include "../position.h"
 #include "../movegen.h"
 #include "../bitboard.h"
@@ -144,7 +148,11 @@ static int probe_wdl_table(Position& pos, int *success)
         return 0;
       }
       // Memory barrier to ensure ptr->ready = 1 is not reordered.
+#ifdef _MSC_VER
+      _ReadWriteBarrier();
+#else
       __asm__ __volatile__ ("" ::: "memory");
+#endif
       ptr->ready = 1;
     }
     UNLOCK(TB_mutex);