mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
implement compileTimeMemoryBarrier in arch.h
This has the same implementation as programOrderMemoryBarrier in x86.h, but makes it available on all architectures.
This commit is contained in:
parent
99bb7924b0
commit
c2a9424f91
14
src/arch.h
14
src/arch.h
@ -17,6 +17,20 @@ extern "C" void NO_RETURN
|
||||
vmJump(void* address, void* base, void* stack, void* thread,
|
||||
uintptr_t returnLow, uintptr_t returnHigh);
|
||||
|
||||
namespace vm {
|
||||
|
||||
inline void
|
||||
compileTimeMemoryBarrier()
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
_ReadWriteBarrier();
|
||||
#else
|
||||
__asm__ __volatile__("": : :"memory");
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace vm
|
||||
|
||||
#if (defined ARCH_x86_32) || (defined ARCH_x86_64)
|
||||
# include "x86.h"
|
||||
#elif defined ARCH_powerpc
|
||||
|
@ -23,7 +23,7 @@
|
||||
#undef max
|
||||
#undef min
|
||||
|
||||
#include "x86.h"
|
||||
#include "arch.h"
|
||||
#include "system.h"
|
||||
|
||||
#define ACQUIRE(s, x) MutexResource MAKE_NAME(mutexResource_) (s, x)
|
||||
|
Loading…
Reference in New Issue
Block a user