LearnWithTouch/App/LearnWithTouch_ios/Libraries/libil2cpp/include/os/Win32/AtomicImpl.h

28 lines
405 B
C
Raw Normal View History

2019-07-01 14:33:21 +02:00
#pragma once
#if IL2CPP_TARGET_WINDOWS
#include "os/Win32/WindowsHeaders.h"
#include "c-api/Atomic-c-api.h"
namespace il2cpp
{
namespace os
{
inline void Atomic::FullMemoryBarrier()
{
#if defined(_AMD64_)
::__faststorefence();
#elif defined(_M_IX86)
::MemoryBarrier();
#elif defined(_M_ARM)
__dmb(_ARM_BARRIER_SY);
#else
#error Not implemented;
#endif
}
}
}
#endif