diff options
author | Gergely Nagy <ngg@ngg.hu> | 2016-12-11 14:50:18 +0100 |
---|---|---|
committer | Gergely Nagy <ngg@ngg.hu> | 2016-12-12 23:04:09 +0100 |
commit | ec021f5429d458467e9fd8dcdd452f886b5bf324 (patch) | |
tree | 125a320ecae3cd1149589673c8e2ad621ed1b6b2 /src/google/protobuf/stubs/atomicops.h | |
parent | 29fb87e1d554a739e47b647a7e8a1a20be8851c9 (diff) |
Add support for Windows ARM builds
Diffstat (limited to 'src/google/protobuf/stubs/atomicops.h')
-rw-r--r-- | src/google/protobuf/stubs/atomicops.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/google/protobuf/stubs/atomicops.h b/src/google/protobuf/stubs/atomicops.h index 10a71ed4..c25492f3 100644 --- a/src/google/protobuf/stubs/atomicops.h +++ b/src/google/protobuf/stubs/atomicops.h @@ -123,8 +123,8 @@ Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr, // ensure that no later memory access can be reordered ahead of the operation. // "Release" operations ensure that no previous memory access can be reordered // after the operation. "Barrier" operations have both "Acquire" and "Release" -// semantics. A MemoryBarrier() has "Barrier" semantics, but does no memory -// access. +// semantics. A MemoryBarrierInternal() has "Barrier" semantics, but does no +// memory access. Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr, Atomic32 old_value, Atomic32 new_value); @@ -132,10 +132,10 @@ Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr, Atomic32 old_value, Atomic32 new_value); -#if defined(__MINGW32__) && defined(MemoryBarrier) -#undef MemoryBarrier -#endif -void MemoryBarrier(); +// This function was renamed from MemoryBarrier to MemoryBarrierInternal +// because MemoryBarrier is a define in Windows ARM builds and we do not +// undefine it because we call it from this function. +void MemoryBarrierInternal(); void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value); void Acquire_Store(volatile Atomic32* ptr, Atomic32 value); void Release_Store(volatile Atomic32* ptr, Atomic32 value); @@ -180,7 +180,7 @@ Atomic64 Release_Load(volatile const Atomic64* ptr); #include <google/protobuf/stubs/atomicops_internals_tsan.h> // MSVC. #elif defined(_MSC_VER) -#if defined(GOOGLE_PROTOBUF_ARCH_IA32) || defined(GOOGLE_PROTOBUF_ARCH_X64) +#if defined(GOOGLE_PROTOBUF_ARCH_IA32) || defined(GOOGLE_PROTOBUF_ARCH_X64) || defined(GOOGLE_PROTOBUF_ARCH_ARM) #include <google/protobuf/stubs/atomicops_internals_x86_msvc.h> #else #error GOOGLE_PROTOBUF_ATOMICOPS_ERROR |