Unverified Commit da89eb25 authored by Feng Xiao's avatar Feng Xiao Committed by GitHub

Merge pull request #3955 from linux-on-ibm-z/master

Adding Release_CompareAndSwap 64-bit variant
parents 6d609955 642e1ac6
......@@ -146,6 +146,14 @@ inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
return __atomic_load_n(ptr, __ATOMIC_RELAXED);
}
inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 old_value,
Atomic64 new_value) {
__atomic_compare_exchange_n(ptr, &old_value, new_value, false,
__ATOMIC_RELEASE, __ATOMIC_ACQUIRE);
return old_value;
}
#endif // defined(__LP64__)
} // namespace internal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment