Reworked _InterlockedCompareExchange a bit more...

This commit is contained in:
kobalicek
2014-06-06 12:32:45 +02:00
parent eb1a71f58a
commit 95e9fe41d2

View File

@@ -21,6 +21,17 @@
# include <mach/mach_time.h>
#endif // ASMJIT_OS_MAC
// [Dependencies - Windows]
#if defined(ASMJIT_OS_WINDOWS)
// `_InterlockedCompareExchange` is only available as intrinsic (MS Compiler).
# if defined(_MSC_VER)
# include <intrin.h>
# pragma intrinsic(_InterlockedCompareExchange)
# else
# define _InterlockedCompareExchange InterlockedCompareExchange
# endif // _MSC_VER
#endif // ASMJIT_OS_WINDOWS
// [Api-Begin]
#include "../apibegin.h"
@@ -31,14 +42,6 @@ namespace asmjit {
// ============================================================================
#if defined(ASMJIT_OS_WINDOWS)
// `_InterlockedCompareExchange` is only available as intrinsic (MS Compiler).
#if defined(_MSC_VER)
# pragma intrinsic(_InterlockedCompareExchange)
#else
# define _InterlockedCompareExchange InterlockedCompareExchange
#endif // _MSC_VER
static volatile uint32_t CpuTicks_hiResOk;
static volatile double CpuTicks_hiResFreq;