mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
use _ReadWriteBarrier intrinsic for MSVC build
This commit is contained in:
parent
875a1a45a3
commit
d5f5c2351b
@ -16,6 +16,9 @@
|
|||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
# include "windows.h"
|
# include "windows.h"
|
||||||
|
# pragma push_macro("assert")
|
||||||
|
# include "intrin.h"
|
||||||
|
# pragma pop_macro("assert")
|
||||||
# undef interface
|
# undef interface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -159,7 +162,7 @@ inline void
|
|||||||
programOrderMemoryBarrier()
|
programOrderMemoryBarrier()
|
||||||
{
|
{
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
MemoryBarrier();
|
_ReadWriteBarrier();
|
||||||
#else
|
#else
|
||||||
__asm__ __volatile__("": : :"memory");
|
__asm__ __volatile__("": : :"memory");
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user