forked from OSchip/llvm-project
Intrin.h: Implement _InterlockedExchangePointer
llvm-svn: 204827
This commit is contained in:
parent
ea06727f03
commit
7dd8bc0a84
|
@ -422,6 +422,7 @@ static __inline__
|
|||
__int64 _InterlockedExchange64(__int64 volatile *_Target, __int64 _Value);
|
||||
static __inline__
|
||||
__int64 _InterlockedExchangeAdd64(__int64 volatile *_Addend, __int64 _Value);
|
||||
static __inline__
|
||||
void *_InterlockedExchangePointer(void *volatile *_Target, void *_Value);
|
||||
static __inline__
|
||||
__int64 _InterlockedIncrement64(__int64 volatile *_Addend);
|
||||
|
@ -795,6 +796,11 @@ _InterlockedExchange64(__int64 volatile *_Target, __int64 _Value) {
|
|||
__atomic_exchange(_Target, &_Value, &_Value, 0);
|
||||
return _Value;
|
||||
}
|
||||
static __inline__ void *__attribute__((__always_inline__, __nodebug__))
|
||||
_InterlockedExchangePointer(void *volatile *_Target, void *_Value) {
|
||||
__atomic_exchange(_Target, &_Value, &_Value, 0);
|
||||
return _Value;
|
||||
}
|
||||
#endif
|
||||
/*----------------------------------------------------------------------------*\
|
||||
|* Interlocked Compare Exchange
|
||||
|
|
Loading…
Reference in New Issue