mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-18 21:14:35 +03:00
Reworked _InterlockedCompareExchange a bit more...
This commit is contained in:
@@ -21,6 +21,17 @@
|
|||||||
# include <mach/mach_time.h>
|
# include <mach/mach_time.h>
|
||||||
#endif // ASMJIT_OS_MAC
|
#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]
|
// [Api-Begin]
|
||||||
#include "../apibegin.h"
|
#include "../apibegin.h"
|
||||||
|
|
||||||
@@ -31,14 +42,6 @@ namespace asmjit {
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
#if defined(ASMJIT_OS_WINDOWS)
|
#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 uint32_t CpuTicks_hiResOk;
|
||||||
static volatile double CpuTicks_hiResFreq;
|
static volatile double CpuTicks_hiResFreq;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user