Index: src/atomic-utils.h |
diff --git a/src/atomic-utils.h b/src/atomic-utils.h |
index 9eb0bc4e39214e3e627b98404a3d64b5f1481e96..0bfd52cfe95995e3d49ff0c8afdf8072e114b59c 100644 |
--- a/src/atomic-utils.h |
+++ b/src/atomic-utils.h |
@@ -20,14 +20,14 @@ class AtomicNumber { |
explicit AtomicNumber(T initial) : value_(initial) {} |
V8_INLINE void Increment(T increment) { |
- base::NoBarrier_AtomicIncrement(&value_, |
- static_cast<base::AtomicWord>(increment)); |
+ base::Barrier_AtomicIncrement(&value_, |
+ static_cast<base::AtomicWord>(increment)); |
} |
- V8_INLINE T Value() { return static_cast<T>(base::NoBarrier_Load(&value_)); } |
+ V8_INLINE T Value() { return static_cast<T>(base::Acquire_Load(&value_)); } |
V8_INLINE void SetValue(T new_value) { |
- base::NoBarrier_Store(&value_, static_cast<base::AtomicWord>(new_value)); |
+ base::Release_Store(&value_, static_cast<base::AtomicWord>(new_value)); |
} |
private: |
@@ -45,19 +45,18 @@ class AtomicValue { |
: value_(cast_helper<T>::to_storage_type(initial)) {} |
V8_INLINE T Value() { |
- return cast_helper<T>::to_return_type(base::NoBarrier_Load(&value_)); |
+ return cast_helper<T>::to_return_type(base::Acquire_Load(&value_)); |
} |
V8_INLINE bool TrySetValue(T old_value, T new_value) { |
- return base::NoBarrier_CompareAndSwap( |
+ return base::Release_CompareAndSwap( |
&value_, cast_helper<T>::to_storage_type(old_value), |
cast_helper<T>::to_storage_type(new_value)) == |
cast_helper<T>::to_storage_type(old_value); |
} |
- V8_INLINE T /*old_value*/ SetValue(T new_value) { |
- return cast_helper<T>::to_return_type(base::NoBarrier_AtomicExchange( |
- &value_, cast_helper<T>::to_storage_type(new_value))); |
+ V8_INLINE void SetValue(T new_value) { |
+ base::Release_Store(&value_, cast_helper<T>::to_storage_type(new_value)); |
} |
private: |
@@ -102,12 +101,11 @@ class AtomicEnumSet { |
bool IsEmpty() const { return ToIntegral() == 0; } |
bool Contains(E element) const { return (ToIntegral() & Mask(element)) != 0; } |
- |
bool ContainsAnyOf(const AtomicEnumSet& set) const { |
return (ToIntegral() & set.ToIntegral()) != 0; |
} |
- void RemoveAll() { base::NoBarrier_Store(&bits_, 0); } |
+ void RemoveAll() { base::Release_Store(&bits_, 0); } |
bool operator==(const AtomicEnumSet& set) const { |
return ToIntegral() == set.ToIntegral(); |
@@ -153,7 +151,7 @@ class AtomicEnumSet { |
STATIC_ASSERT(E::kLastValue < (sizeof(base::AtomicWord) * CHAR_BIT)); |
V8_INLINE base::AtomicWord ToIntegral() const { |
- return base::NoBarrier_Load(&bits_); |
+ return base::Acquire_Load(&bits_); |
} |
V8_INLINE base::AtomicWord Mask(E element) const { |