[XDK] Avoid defining interlocked intrinsics. CORE-17190
authorThomas Faber <thomas.faber@reactos.org>
Fri, 14 Aug 2020 07:19:21 +0000 (09:19 +0200)
committerThomas Faber <thomas.faber@reactos.org>
Fri, 14 Aug 2020 09:08:45 +0000 (11:08 +0200)
Fixes build with MSVC 19.27+.

sdk/include/xdk/interlocked.h

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