- Revert winbase.h interlocked intrinsic change for now *sigh*

svn path=/trunk/; revision=42235
This commit is contained in:
Stefan Ginsberg 2009-07-26 16:18:56 +00:00
parent e0b7b058c3
commit 25aa6b6a41

View file

@ -1835,6 +1835,43 @@ VOID WINAPI InitializeSRWLock(PSRWLOCK);
#define InterlockedCompareExchangeAcquire64 InterlockedCompareExchange64
#define InterlockedCompareExchangeRelease64 InterlockedCompareExchange64
#else // !(defined (_M_AMD64) || defined (_M_IA64))
LONG WINAPI InterlockedOr(IN OUT LONG volatile *,LONG);
LONG WINAPI InterlockedAnd(IN OUT LONG volatile *,LONG);
LONG WINAPI InterlockedCompareExchange(IN OUT LONG volatile *,LONG,LONG);
LONG WINAPI InterlockedDecrement(IN OUT LONG volatile *);
LONG WINAPI InterlockedExchange(IN OUT LONG volatile *,LONG);
#if defined(_WIN64)
/* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */
#define InterlockedExchangePointer(t,v) \
(PVOID)_InterlockedExchange64((LONGLONG*)(t),(LONGLONG)(v))
/* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */
#define InterlockedCompareExchangePointer(d,e,c) \
(PVOID)_InterlockedCompareExchange64((LONGLONG*)(d),(LONGLONG)(e),(LONGLONG)(c))
#else
/* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */
#define InterlockedExchangePointer(t,v) \
(PVOID)InterlockedExchange((LPLONG)(t),(LONG)(v))
/* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */
#define InterlockedCompareExchangePointer(d,e,c) \
(PVOID)InterlockedCompareExchange((LPLONG)(d),(LONG)(e),(LONG)(c))
#endif
LONG WINAPI InterlockedExchangeAdd(IN OUT LONG volatile *,LONG);
#if (_WIN32_WINNT >= 0x0501)
PSLIST_ENTRY WINAPI InterlockedFlushSList(PSLIST_HEADER);
#endif
LONG WINAPI InterlockedIncrement(IN OUT LONG volatile *);
#if (_WIN32_WINNT >= 0x0501)
PSLIST_ENTRY WINAPI InterlockedPopEntrySList(PSLIST_HEADER);
PSLIST_ENTRY WINAPI InterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY);
#endif
#endif // !(defined (_M_AMD64) || defined (_M_IA64))
VOID WINAPI InitializeSListHead(PSLIST_HEADER);
USHORT WINAPI QueryDepthSList(PSLIST_HEADER);
#if !defined(InterlockedAnd)
#define InterlockedAnd InterlockedAnd_Inline
FORCEINLINE
@ -1881,43 +1918,6 @@ InterlockedOr_Inline(IN OUT volatile LONG *Target,
}
#endif
#else // !(defined (_M_AMD64) || defined (_M_IA64))
LONG WINAPI InterlockedOr(IN OUT LONG volatile *,LONG);
LONG WINAPI InterlockedAnd(IN OUT LONG volatile *,LONG);
LONG WINAPI InterlockedCompareExchange(IN OUT LONG volatile *,LONG,LONG);
LONG WINAPI InterlockedDecrement(IN OUT LONG volatile *);
LONG WINAPI InterlockedExchange(IN OUT LONG volatile *,LONG);
#if defined(_WIN64)
/* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */
#define InterlockedExchangePointer(t,v) \
(PVOID)_InterlockedExchange64((LONGLONG*)(t),(LONGLONG)(v))
/* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */
#define InterlockedCompareExchangePointer(d,e,c) \
(PVOID)_InterlockedCompareExchange64((LONGLONG*)(d),(LONGLONG)(e),(LONGLONG)(c))
#else
/* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */
#define InterlockedExchangePointer(t,v) \
(PVOID)InterlockedExchange((LPLONG)(t),(LONG)(v))
/* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */
#define InterlockedCompareExchangePointer(d,e,c) \
(PVOID)InterlockedCompareExchange((LPLONG)(d),(LONG)(e),(LONG)(c))
#endif
LONG WINAPI InterlockedExchangeAdd(IN OUT LONG volatile *,LONG);
#if (_WIN32_WINNT >= 0x0501)
PSLIST_ENTRY WINAPI InterlockedFlushSList(PSLIST_HEADER);
#endif
LONG WINAPI InterlockedIncrement(IN OUT LONG volatile *);
#if (_WIN32_WINNT >= 0x0501)
PSLIST_ENTRY WINAPI InterlockedPopEntrySList(PSLIST_HEADER);
PSLIST_ENTRY WINAPI InterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY);
#endif
#endif // !(defined (_M_AMD64) || defined (_M_IA64))
VOID WINAPI InitializeSListHead(PSLIST_HEADER);
USHORT WINAPI QueryDepthSList(PSLIST_HEADER);
#endif /* __INTERLOCKED_DECLARED */
BOOL WINAPI IsBadCodePtr(FARPROC);