31 #ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_GCC_H_
32 #define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_GCC_H_
41 __atomic_compare_exchange_n(ptr, &old_value, new_value,
true,
42 __ATOMIC_RELAXED, __ATOMIC_RELAXED);
48 return __atomic_exchange_n(ptr, new_value, __ATOMIC_RELAXED);
53 return __atomic_add_fetch(ptr, increment, __ATOMIC_RELAXED);
58 return __atomic_add_fetch(ptr, increment, __ATOMIC_SEQ_CST);
64 __atomic_compare_exchange(ptr, &old_value, &new_value,
true,
65 __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);
72 __atomic_compare_exchange_n(ptr, &old_value, new_value,
true,
73 __ATOMIC_RELEASE, __ATOMIC_ACQUIRE);
78 __atomic_store_n(ptr, value, __ATOMIC_RELAXED);
86 __atomic_store_n(ptr, value, __ATOMIC_SEQ_CST);
90 __atomic_store_n(ptr, value, __ATOMIC_RELEASE);
94 return __atomic_load_n(ptr, __ATOMIC_RELAXED);
98 return __atomic_load_n(ptr, __ATOMIC_ACQUIRE);
102 return __atomic_load_n(ptr, __ATOMIC_SEQ_CST);
108 __atomic_store_n(ptr, value, __ATOMIC_RELEASE);
111 inline Atomic64
Acquire_Load(
volatile const Atomic64* ptr) {
112 return __atomic_load_n(ptr, __ATOMIC_ACQUIRE);
117 Atomic64 new_value) {
118 __atomic_compare_exchange_n(ptr, &old_value, new_value,
true,
119 __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);
125 Atomic64 new_value) {
126 __atomic_compare_exchange_n(ptr, &old_value, new_value,
true,
127 __ATOMIC_RELAXED, __ATOMIC_RELAXED);
131 #endif // defined(__LP64__)
137 #endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_GCC_H_
Atomic32 Acquire_Load(volatile const Atomic32 *ptr)
Definition: atomicops_internals_arm64_gcc.h:167
void Acquire_Store(volatile Atomic32 *ptr, Atomic32 value)
Definition: atomicops_internals_arm64_gcc.h:149
Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32 *ptr, Atomic32 old_value, Atomic32 new_value)
Definition: atomicops_internals_arm64_gcc.h:52
void Release_Store(volatile Atomic32 *ptr, Atomic32 value)
Definition: atomicops_internals_arm64_gcc.h:154
Atomic32 Release_Load(volatile const Atomic32 *ptr)
Definition: atomicops_internals_arm64_gcc.h:180
Definition: document.h:390
int32 Atomic32
Definition: atomicops.h:65
Atomic32 Release_CompareAndSwap(volatile Atomic32 *ptr, Atomic32 old_value, Atomic32 new_value)
Definition: atomicops_internals_arm64_gcc.h:136
Atomic32 Barrier_AtomicIncrement(volatile Atomic32 *ptr, Atomic32 increment)
Definition: atomicops_internals_arm64_gcc.h:118
Definition: BnetFileGenerator.h:47
Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32 *ptr, Atomic32 increment)
Definition: atomicops_internals_arm64_gcc.h:97
const FieldDescriptor value
Definition: descriptor.h:1522
Atomic32 NoBarrier_AtomicExchange(volatile Atomic32 *ptr, Atomic32 new_value)
Definition: atomicops_internals_arm64_gcc.h:77
void NoBarrier_Store(volatile Atomic32 *ptr, Atomic32 value)
Definition: atomicops_internals_arm64_gcc.h:145
Atomic32 NoBarrier_Load(volatile const Atomic32 *ptr)
Definition: atomicops_internals_arm64_gcc.h:163
Atomic32 Acquire_CompareAndSwap(volatile Atomic32 *ptr, Atomic32 old_value, Atomic32 new_value)
Definition: atomicops_internals_arm64_gcc.h:127
void MemoryBarrier()
Definition: atomicops_internals_arm64_gcc.h:40