Commit 64eed89a authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

include: X86 msvc has _InterlockedExchangePointer and _InterlockedCompareExchangePointer.

I fixed this issue in ad05f33d, but a40973f2 regressed this again. I was carrying a patch for quite a while, feeling dejavu. According to boost they are available since MSVC 2015. I don't have old versions of msvc hanging around, and we don't put much value in keeping old versions working, so just use them unconditionally.
parent 28233dd3
...@@ -6541,8 +6541,10 @@ typedef enum _FIRMWARE_TYPE ...@@ -6541,8 +6541,10 @@ typedef enum _FIRMWARE_TYPE
#pragma intrinsic(_InterlockedAnd) #pragma intrinsic(_InterlockedAnd)
#pragma intrinsic(_InterlockedCompareExchange) #pragma intrinsic(_InterlockedCompareExchange)
#pragma intrinsic(_InterlockedCompareExchange64) #pragma intrinsic(_InterlockedCompareExchange64)
#pragma intrinsic(_InterlockedCompareExchangePointer)
#pragma intrinsic(_InterlockedExchange) #pragma intrinsic(_InterlockedExchange)
#pragma intrinsic(_InterlockedExchangeAdd) #pragma intrinsic(_InterlockedExchangeAdd)
#pragma intrinsic(_InterlockedExchangePointer)
#pragma intrinsic(_InterlockedIncrement) #pragma intrinsic(_InterlockedIncrement)
#pragma intrinsic(_InterlockedIncrement16) #pragma intrinsic(_InterlockedIncrement16)
#pragma intrinsic(_InterlockedDecrement) #pragma intrinsic(_InterlockedDecrement)
...@@ -6556,10 +6558,12 @@ BOOLEAN _BitScanReverse(unsigned long*,unsigned long); ...@@ -6556,10 +6558,12 @@ BOOLEAN _BitScanReverse(unsigned long*,unsigned long);
long _InterlockedAnd(long volatile *,long); long _InterlockedAnd(long volatile *,long);
long _InterlockedCompareExchange(long volatile*,long,long); long _InterlockedCompareExchange(long volatile*,long,long);
long long _InterlockedCompareExchange64(long long volatile*,long long,long long); long long _InterlockedCompareExchange64(long long volatile*,long long,long long);
void * _InterlockedCompareExchangePointer(void *volatile*,void*,void*);
long _InterlockedDecrement(long volatile*); long _InterlockedDecrement(long volatile*);
short _InterlockedDecrement16(short volatile*); short _InterlockedDecrement16(short volatile*);
long _InterlockedExchange(long volatile*,long); long _InterlockedExchange(long volatile*,long);
long _InterlockedExchangeAdd(long volatile*,long); long _InterlockedExchangeAdd(long volatile*,long);
void * _InterlockedExchangePointer(void *volatile*,void*);
long _InterlockedIncrement(long volatile*); long _InterlockedIncrement(long volatile*);
short _InterlockedIncrement16(short volatile*); short _InterlockedIncrement16(short volatile*);
long _InterlockedOr(long volatile *,long); long _InterlockedOr(long volatile *,long);
...@@ -6569,19 +6573,15 @@ DECLSPEC_NORETURN void __fastfail(unsigned int); ...@@ -6569,19 +6573,15 @@ DECLSPEC_NORETURN void __fastfail(unsigned int);
#ifndef __i386__ #ifndef __i386__
#pragma intrinsic(_InterlockedAnd64) #pragma intrinsic(_InterlockedAnd64)
#pragma intrinsic(_InterlockedCompareExchangePointer)
#pragma intrinsic(_InterlockedDecrement64) #pragma intrinsic(_InterlockedDecrement64)
#pragma intrinsic(_InterlockedExchangeAdd64) #pragma intrinsic(_InterlockedExchangeAdd64)
#pragma intrinsic(_InterlockedExchangePointer)
#pragma intrinsic(_InterlockedIncrement64) #pragma intrinsic(_InterlockedIncrement64)
#pragma intrinsic(_InterlockedOr64) #pragma intrinsic(_InterlockedOr64)
#pragma intrinsic(_InterlockedXor64) #pragma intrinsic(_InterlockedXor64)
__int64 _InterlockedAnd64(__int64 volatile *, __int64); __int64 _InterlockedAnd64(__int64 volatile *, __int64);
void * _InterlockedCompareExchangePointer(void *volatile*,void*,void*);
__int64 _InterlockedDecrement64(__int64 volatile *); __int64 _InterlockedDecrement64(__int64 volatile *);
__int64 _InterlockedExchangeAdd64(__int64 volatile *, __int64); __int64 _InterlockedExchangeAdd64(__int64 volatile *, __int64);
void * _InterlockedExchangePointer(void *volatile*,void*);
__int64 _InterlockedIncrement64(__int64 volatile *); __int64 _InterlockedIncrement64(__int64 volatile *);
__int64 _InterlockedOr64(__int64 volatile *, __int64); __int64 _InterlockedOr64(__int64 volatile *, __int64);
__int64 _InterlockedXor64(__int64 volatile *, __int64); __int64 _InterlockedXor64(__int64 volatile *, __int64);
...@@ -6595,11 +6595,6 @@ static FORCEINLINE __int64 InterlockedAnd64( __int64 volatile *dest, __int64 val ...@@ -6595,11 +6595,6 @@ static FORCEINLINE __int64 InterlockedAnd64( __int64 volatile *dest, __int64 val
return prev; return prev;
} }
static FORCEINLINE void * WINAPI InterlockedCompareExchangePointer( void *volatile *dest, void *xchg, void *compare )
{
return (void *)_InterlockedCompareExchange( (long volatile*)dest, (long)xchg, (long)compare );
}
static FORCEINLINE __int64 InterlockedExchangeAdd64( __int64 volatile *dest, __int64 val ) static FORCEINLINE __int64 InterlockedExchangeAdd64( __int64 volatile *dest, __int64 val )
{ {
__int64 prev; __int64 prev;
...@@ -6607,11 +6602,6 @@ static FORCEINLINE __int64 InterlockedExchangeAdd64( __int64 volatile *dest, __i ...@@ -6607,11 +6602,6 @@ static FORCEINLINE __int64 InterlockedExchangeAdd64( __int64 volatile *dest, __i
return prev; return prev;
} }
static FORCEINLINE void * WINAPI InterlockedExchangePointer( void *volatile *dest, void *val )
{
return (void *)_InterlockedExchange( (long volatile*)dest, (long)val );
}
static FORCEINLINE __int64 InterlockedIncrement64( __int64 volatile *dest ) static FORCEINLINE __int64 InterlockedIncrement64( __int64 volatile *dest )
{ {
return InterlockedExchangeAdd64( dest, 1 ) + 1; return InterlockedExchangeAdd64( dest, 1 ) + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment