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

Adding Release_CompareAndSwap 64-bit variant
pull/3506/merge
Feng Xiao 7 years ago committed by GitHub
commit da89eb25ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/google/protobuf/stubs/atomicops_internals_generic_gcc.h

@ -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

Loading…
Cancel
Save