[0.4.14][XDK] Avoid defining interlocked intrinsics. CORE-17190

Fixes build with MSVC 19.27+.

cherry picked from commit 0.4.15-dev-510-g
960511094b
This commit is contained in:
Thomas Faber 2020-08-14 09:19:21 +02:00 committed by Joachim Henze
parent 1128de5b86
commit 8e961a1158

View file

@ -301,9 +301,11 @@
#ifdef _M_IX86 #ifdef _M_IX86
#undef _InterlockedExchange64
#define _InterlockedExchange64 _InlineInterlockedExchange64
FORCEINLINE FORCEINLINE
LONG64 LONG64
_InterlockedExchange64( _InlineInterlockedExchange64(
_Inout_ _Interlocked_operand_ volatile LONG64 *Target, _Inout_ _Interlocked_operand_ volatile LONG64 *Target,
_In_ LONG64 Value) _In_ LONG64 Value)
{ {
@ -316,9 +318,11 @@ _InterlockedExchange64(
} }
} }
#undef _InterlockedAdd64
#define _InterlockedAdd64 _InlineInterlockedAdd64
FORCEINLINE FORCEINLINE
LONG64 LONG64
_InterlockedAdd64( _InlineInterlockedAdd64(
_Inout_ _Interlocked_operand_ volatile LONG64 *Target, _Inout_ _Interlocked_operand_ volatile LONG64 *Target,
_In_ LONG64 Value) _In_ LONG64 Value)
{ {
@ -332,9 +336,11 @@ _InterlockedAdd64(
} }
} }
#undef _InterlockedExchangeAdd64
#define _InterlockedExchangeAdd64 _InlineInterlockedExchangeAdd64
FORCEINLINE FORCEINLINE
LONG64 LONG64
_InterlockedExchangeAdd64 ( _InlineInterlockedExchangeAdd64(
_Inout_ _Interlocked_operand_ volatile LONG64 *Target, _Inout_ _Interlocked_operand_ volatile LONG64 *Target,
_In_ LONG64 Value _In_ LONG64 Value
) )
@ -349,9 +355,11 @@ _InterlockedExchangeAdd64 (
} }
} }
#undef _InterlockedAnd64
#define _InterlockedAnd64 _InlineInterlockedAnd64
FORCEINLINE FORCEINLINE
LONG64 LONG64
_InterlockedAnd64( _InlineInterlockedAnd64(
_Inout_ _Interlocked_operand_ volatile LONG64 *Target, _Inout_ _Interlocked_operand_ volatile LONG64 *Target,
_In_ LONG64 Value) _In_ LONG64 Value)
{ {
@ -365,9 +373,11 @@ _InterlockedAnd64(
} }
} }
#undef _InterlockedOr64
#define _InterlockedOr64 _InlineInterlockedOr64
FORCEINLINE FORCEINLINE
LONG64 LONG64
_InterlockedOr64( _InlineInterlockedOr64(
_Inout_ _Interlocked_operand_ volatile LONG64 *Target, _Inout_ _Interlocked_operand_ volatile LONG64 *Target,
_In_ LONG64 Value) _In_ LONG64 Value)
{ {
@ -381,9 +391,11 @@ _InterlockedOr64(
} }
} }
#undef _InterlockedXor64
#define _InterlockedXor64 _InlineInterlockedXor64
FORCEINLINE FORCEINLINE
LONG64 LONG64
_InterlockedXor64( _InlineInterlockedXor64(
_Inout_ _Interlocked_operand_ volatile LONG64 *Target, _Inout_ _Interlocked_operand_ volatile LONG64 *Target,
_In_ LONG64 Value) _In_ LONG64 Value)
{ {
@ -397,17 +409,21 @@ _InterlockedXor64(
} }
} }
#undef _InterlockedIncrement64
#define _InterlockedIncrement64 _InlineInterlockedIncrement64
FORCEINLINE FORCEINLINE
LONG64 LONG64
_InterlockedIncrement64( _InlineInterlockedIncrement64(
_Inout_ _Interlocked_operand_ volatile LONG64 *Target) _Inout_ _Interlocked_operand_ volatile LONG64 *Target)
{ {
return _InterlockedAdd64(Target, 1); return _InterlockedAdd64(Target, 1);
} }
#undef _InterlockedDecrement64
#define _InterlockedDecrement64 _InlineInterlockedDecrement64
FORCEINLINE FORCEINLINE
LONG64 LONG64
_InterlockedDecrement64( _InlineInterlockedDecrement64(
_Inout_ _Interlocked_operand_ volatile LONG64 *Target) _Inout_ _Interlocked_operand_ volatile LONG64 *Target)
{ {
return _InterlockedAdd64(Target, -1); return _InterlockedAdd64(Target, -1);