forked from OSchip/llvm-project
parent
6313f780e1
commit
1d1f74cbf5
|
|
@ -34,9 +34,9 @@ extern "C" void *_InterlockedCompareExchangePointer(
|
||||||
// There's no _InterlockedCompareExchangePointer intrinsic on x86,
|
// There's no _InterlockedCompareExchangePointer intrinsic on x86,
|
||||||
// so call _InterlockedCompareExchange instead.
|
// so call _InterlockedCompareExchange instead.
|
||||||
extern "C"
|
extern "C"
|
||||||
long __cdecl _InterlockedCompareExchange(
|
long __cdecl _InterlockedCompareExchange( // NOLINT
|
||||||
long volatile *Destination,
|
long volatile *Destination, // NOLINT
|
||||||
long Exchange, long Comparand);
|
long Exchange, long Comparand); // NOLINT
|
||||||
#pragma intrinsic(_InterlockedCompareExchange)
|
#pragma intrinsic(_InterlockedCompareExchange)
|
||||||
|
|
||||||
inline static void *_InterlockedCompareExchangePointer(
|
inline static void *_InterlockedCompareExchangePointer(
|
||||||
|
|
@ -44,9 +44,9 @@ inline static void *_InterlockedCompareExchangePointer(
|
||||||
void *Exchange, void *Comparand) {
|
void *Exchange, void *Comparand) {
|
||||||
return reinterpret_cast<void*>(
|
return reinterpret_cast<void*>(
|
||||||
_InterlockedCompareExchange(
|
_InterlockedCompareExchange(
|
||||||
reinterpret_cast<long volatile*>(Destination),
|
reinterpret_cast<long volatile*>(Destination), // NOLINT
|
||||||
reinterpret_cast<long>(Exchange),
|
reinterpret_cast<long>(Exchange), // NOLINT
|
||||||
reinterpret_cast<long>(Comparand)));
|
reinterpret_cast<long>(Comparand))); // NOLINT
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue