Index: src/base/atomicops_internals_x86_msvc.h |
diff --git a/src/base/atomicops_internals_x86_msvc.h b/src/base/atomicops_internals_x86_msvc.h |
index c37bc78df6d172653977de1270eee3159975e18a..12c0129c8349cd47ff7e9089ba4bb99af4fb580b 100644 |
--- a/src/base/atomicops_internals_x86_msvc.h |
+++ b/src/base/atomicops_internals_x86_msvc.h |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-// This file is an internal atomic implementation, use atomicops.h instead. |
+// This file is an internal atomic implementation, use base/atomicops.h instead. |
#ifndef V8_BASE_ATOMICOPS_INTERNALS_X86_MSVC_H_ |
#define V8_BASE_ATOMICOPS_INTERNALS_X86_MSVC_H_ |
@@ -26,25 +26,23 @@ inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, |
Atomic32 old_value, |
Atomic32 new_value) { |
LONG result = InterlockedCompareExchange( |
- reinterpret_cast<volatile LONG*>(ptr), |
- static_cast<LONG>(new_value), |
+ reinterpret_cast<volatile LONG*>(ptr), static_cast<LONG>(new_value), |
static_cast<LONG>(old_value)); |
return static_cast<Atomic32>(result); |
} |
inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr, |
Atomic32 new_value) { |
- LONG result = InterlockedExchange( |
- reinterpret_cast<volatile LONG*>(ptr), |
- static_cast<LONG>(new_value)); |
+ LONG result = InterlockedExchange(reinterpret_cast<volatile LONG*>(ptr), |
+ static_cast<LONG>(new_value)); |
return static_cast<Atomic32>(result); |
} |
inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr, |
Atomic32 increment) { |
- return InterlockedExchangeAdd( |
- reinterpret_cast<volatile LONG*>(ptr), |
- static_cast<LONG>(increment)) + increment; |
+ return InterlockedExchangeAdd(reinterpret_cast<volatile LONG*>(ptr), |
+ static_cast<LONG>(increment)) + |
+ increment; |
} |
inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr, |
@@ -52,9 +50,6 @@ inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr, |
return Barrier_AtomicIncrement(ptr, increment); |
} |
-#if !(defined(_MSC_VER) && _MSC_VER >= 1400) |
-#error "We require at least vs2005 for MemoryBarrier" |
-#endif |
inline void MemoryBarrier() { |
#if defined(V8_HOST_ARCH_64_BIT) |
// See #undef and note at the top of this file. |
@@ -117,7 +112,7 @@ inline Atomic32 Release_Load(volatile const Atomic32* ptr) { |
// 64-bit low-level operations on 64-bit platform. |
-STATIC_ASSERT(sizeof(Atomic64) == sizeof(PVOID)); |
+static_assert(sizeof(Atomic64) == sizeof(PVOID), "atomic word is atomic"); |
inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr, |
Atomic64 old_value, |