aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sanitizer_common/sanitizer_atomic_msvc.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sanitizer_common/sanitizer_atomic_msvc.h')
-rw-r--r--lib/sanitizer_common/sanitizer_atomic_msvc.h63
1 files changed, 27 insertions, 36 deletions
diff --git a/lib/sanitizer_common/sanitizer_atomic_msvc.h b/lib/sanitizer_common/sanitizer_atomic_msvc.h
index a249657d6617..6a7c5465dcbb 100644
--- a/lib/sanitizer_common/sanitizer_atomic_msvc.h
+++ b/lib/sanitizer_common/sanitizer_atomic_msvc.h
@@ -20,44 +20,35 @@ extern "C" void _mm_mfence();
#pragma intrinsic(_mm_mfence)
extern "C" void _mm_pause();
#pragma intrinsic(_mm_pause)
-extern "C" char _InterlockedExchange8( // NOLINT
- char volatile *Addend, char Value); // NOLINT
+extern "C" char _InterlockedExchange8(char volatile *Addend, char Value);
#pragma intrinsic(_InterlockedExchange8)
-extern "C" short _InterlockedExchange16( // NOLINT
- short volatile *Addend, short Value); // NOLINT
+extern "C" short _InterlockedExchange16(short volatile *Addend, short Value);
#pragma intrinsic(_InterlockedExchange16)
-extern "C" long _InterlockedExchange( // NOLINT
- long volatile *Addend, long Value); // NOLINT
+extern "C" long _InterlockedExchange(long volatile *Addend, long Value);
#pragma intrinsic(_InterlockedExchange)
-extern "C" long _InterlockedExchangeAdd( // NOLINT
- long volatile * Addend, long Value); // NOLINT
+extern "C" long _InterlockedExchangeAdd(long volatile *Addend, long Value);
#pragma intrinsic(_InterlockedExchangeAdd)
-extern "C" char _InterlockedCompareExchange8( // NOLINT
- char volatile *Destination, // NOLINT
- char Exchange, char Comparand); // NOLINT
+extern "C" char _InterlockedCompareExchange8(char volatile *Destination,
+ char Exchange, char Comparand);
#pragma intrinsic(_InterlockedCompareExchange8)
-extern "C" short _InterlockedCompareExchange16( // NOLINT
- short volatile *Destination, // NOLINT
- short Exchange, short Comparand); // NOLINT
+extern "C" short _InterlockedCompareExchange16(short volatile *Destination,
+ short Exchange, short Comparand);
#pragma intrinsic(_InterlockedCompareExchange16)
-extern "C"
-long long _InterlockedCompareExchange64( // NOLINT
- long long volatile *Destination, // NOLINT
- long long Exchange, long long Comparand); // NOLINT
+extern "C" long long _InterlockedCompareExchange64(
+ long long volatile *Destination, long long Exchange, long long Comparand);
#pragma intrinsic(_InterlockedCompareExchange64)
extern "C" void *_InterlockedCompareExchangePointer(
void *volatile *Destination,
void *Exchange, void *Comparand);
#pragma intrinsic(_InterlockedCompareExchangePointer)
-extern "C"
-long __cdecl _InterlockedCompareExchange( // NOLINT
- long volatile *Destination, // NOLINT
- long Exchange, long Comparand); // NOLINT
+extern "C" long __cdecl _InterlockedCompareExchange(long volatile *Destination,
+ long Exchange,
+ long Comparand);
#pragma intrinsic(_InterlockedCompareExchange)
#ifdef _WIN64
-extern "C" long long _InterlockedExchangeAdd64( // NOLINT
- long long volatile * Addend, long long Value); // NOLINT
+extern "C" long long _InterlockedExchangeAdd64(long long volatile *Addend,
+ long long Value);
#pragma intrinsic(_InterlockedExchangeAdd64)
#endif
@@ -115,8 +106,8 @@ INLINE u32 atomic_fetch_add(volatile atomic_uint32_t *a,
u32 v, memory_order mo) {
(void)mo;
DCHECK(!((uptr)a % sizeof(*a)));
- return (u32)_InterlockedExchangeAdd(
- (volatile long*)&a->val_dont_use, (long)v); // NOLINT
+ return (u32)_InterlockedExchangeAdd((volatile long *)&a->val_dont_use,
+ (long)v);
}
INLINE uptr atomic_fetch_add(volatile atomic_uintptr_t *a,
@@ -124,11 +115,11 @@ INLINE uptr atomic_fetch_add(volatile atomic_uintptr_t *a,
(void)mo;
DCHECK(!((uptr)a % sizeof(*a)));
#ifdef _WIN64
- return (uptr)_InterlockedExchangeAdd64(
- (volatile long long*)&a->val_dont_use, (long long)v); // NOLINT
+ return (uptr)_InterlockedExchangeAdd64((volatile long long *)&a->val_dont_use,
+ (long long)v);
#else
- return (uptr)_InterlockedExchangeAdd(
- (volatile long*)&a->val_dont_use, (long)v); // NOLINT
+ return (uptr)_InterlockedExchangeAdd((volatile long *)&a->val_dont_use,
+ (long)v);
#endif
}
@@ -136,8 +127,8 @@ INLINE u32 atomic_fetch_sub(volatile atomic_uint32_t *a,
u32 v, memory_order mo) {
(void)mo;
DCHECK(!((uptr)a % sizeof(*a)));
- return (u32)_InterlockedExchangeAdd(
- (volatile long*)&a->val_dont_use, -(long)v); // NOLINT
+ return (u32)_InterlockedExchangeAdd((volatile long *)&a->val_dont_use,
+ -(long)v);
}
INLINE uptr atomic_fetch_sub(volatile atomic_uintptr_t *a,
@@ -145,11 +136,11 @@ INLINE uptr atomic_fetch_sub(volatile atomic_uintptr_t *a,
(void)mo;
DCHECK(!((uptr)a % sizeof(*a)));
#ifdef _WIN64
- return (uptr)_InterlockedExchangeAdd64(
- (volatile long long*)&a->val_dont_use, -(long long)v); // NOLINT
+ return (uptr)_InterlockedExchangeAdd64((volatile long long *)&a->val_dont_use,
+ -(long long)v);
#else
- return (uptr)_InterlockedExchangeAdd(
- (volatile long*)&a->val_dont_use, -(long)v); // NOLINT
+ return (uptr)_InterlockedExchangeAdd((volatile long *)&a->val_dont_use,
+ -(long)v);
#endif
}