MSVC compiling fixes

No functional change.

Resolves #150
This commit is contained in:
Gary Linscott
2014-12-11 13:03:44 -05:00
parent b15dcd9774
commit afafdf7b73
3 changed files with 39 additions and 23 deletions
+6
View File
@@ -7,6 +7,8 @@
this code to other chess engines.
*/
#include <algorithm>
#include "../position.h"
#include "../movegen.h"
#include "../bitboard.h"
@@ -144,7 +146,11 @@ static int probe_wdl_table(Position& pos, int *success)
return 0;
}
// Memory barrier to ensure ptr->ready = 1 is not reordered.
#ifdef _WIN32
_ReadWriteBarrier();
#else
__asm__ __volatile__ ("" ::: "memory");
#endif
ptr->ready = 1;
}
UNLOCK(TB_mutex);