53 #ifndef GOOGLE_PROTOBUF_ATOMICOPS_H_
54 #define GOOGLE_PROTOBUF_ATOMICOPS_H_
57 #ifndef GOOGLE_PROTOBUF_NO_THREAD_SAFETY
66 #ifdef GOOGLE_PROTOBUF_ARCH_64_BIT
69 #if defined(__ILP32__) || defined(GOOGLE_PROTOBUF_OS_NACL) || defined(GOOGLE_PROTOBUF_ARCH_SPARC)
73 typedef int64 Atomic64;
124 #if defined(__MINGW32__) && defined(MemoryBarrier)
137 #ifdef GOOGLE_PROTOBUF_ARCH_64_BIT
157 #endif // GOOGLE_PROTOBUF_ARCH_64_BIT
164 #define GOOGLE_PROTOBUF_ATOMICOPS_ERROR \
165 #error "Atomic operations are not supported on your platform"
168 #if defined(THREAD_SANITIZER)
171 #elif defined(_MSC_VER)
172 #if defined(GOOGLE_PROTOBUF_ARCH_IA32) || defined(GOOGLE_PROTOBUF_ARCH_X64)
179 #elif defined(GOOGLE_PROTOBUF_OS_SOLARIS)
183 #elif defined(GOOGLE_PROTOBUF_OS_APPLE)
187 #elif defined(__GNUC__)
188 #if defined(GOOGLE_PROTOBUF_ARCH_IA32) || defined(GOOGLE_PROTOBUF_ARCH_X64)
190 #elif defined(GOOGLE_PROTOBUF_ARCH_ARM) && defined(__linux__)
192 #elif defined(GOOGLE_PROTOBUF_ARCH_AARCH64)
194 #elif defined(GOOGLE_PROTOBUF_ARCH_ARM_QNX)
196 #elif defined(GOOGLE_PROTOBUF_ARCH_MIPS) || defined(GOOGLE_PROTOBUF_ARCH_MIPS64)
198 #elif defined(__native_client__)
200 #elif (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4))
202 #elif defined(__clang__)
203 #if __has_extension(c_atomic)
219 #if defined(GOOGLE_PROTOBUF_OS_APPLE)
223 #undef GOOGLE_PROTOBUF_ATOMICOPS_ERROR
225 #endif // GOOGLE_PROTOBUF_NO_THREAD_SAFETY
227 #endif // GOOGLE_PROTOBUF_ATOMICOPS_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
int32_t int32
Definition: common.h:172
Atomic32 Release_Load(volatile const Atomic32 *ptr)
Definition: atomicops_internals_arm64_gcc.h:180
Definition: document.h:390
intptr_t AtomicWord
Definition: atomicops.h:81
int32 Atomic32
Definition: atomicops.h:65
int64_t int64
Definition: common.h:173
Atomic32 Release_CompareAndSwap(volatile Atomic32 *ptr, Atomic32 old_value, Atomic32 new_value)
Definition: atomicops_internals_arm64_gcc.h:136
_W64 signed int intptr_t
Definition: stdint.h:118
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
#define GOOGLE_PROTOBUF_ATOMICOPS_ERROR
Definition: atomicops.h:164
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