mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 10:06:26 +08:00
Only use _ReadWriteBarrier on MSVC
It was causing compile errors when cross-compiling using mingw. No functional change.
This commit is contained in:
@@ -146,8 +146,8 @@ static int probe_wdl_table(Position& pos, int *success)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// Memory barrier to ensure ptr->ready = 1 is not reordered.
|
// Memory barrier to ensure ptr->ready = 1 is not reordered.
|
||||||
#ifdef _WIN32
|
#ifdef _MSC_VER
|
||||||
_ReadWriteBarrier();
|
_ReadWriteBarrier();
|
||||||
#else
|
#else
|
||||||
__asm__ __volatile__ ("" ::: "memory");
|
__asm__ __volatile__ ("" ::: "memory");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user