| Index: third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.h
|
| diff --git a/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.h b/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.h
|
| index edccc59dee615465b2f8982df61771b22db5aae0..e80121fdf8e0cc26b1274883cd8cc5d01acfea58 100644
|
| --- a/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.h
|
| +++ b/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.h
|
| @@ -119,18 +119,18 @@ inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
|
|
|
| // 64-bit implementations of memory barrier can be simpler, because it
|
| // "mfence" is guaranteed to exist.
|
| -inline void MemoryBarrier() {
|
| +inline void MemoryBarrierInternal() {
|
| __asm__ __volatile__("mfence" : : : "memory");
|
| }
|
|
|
| inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
|
| *ptr = value;
|
| - MemoryBarrier();
|
| + MemoryBarrierInternal();
|
| }
|
|
|
| #else
|
|
|
| -inline void MemoryBarrier() {
|
| +inline void MemoryBarrierInternal() {
|
| if (AtomicOps_Internalx86CPUFeatures.has_sse2) {
|
| __asm__ __volatile__("mfence" : : : "memory");
|
| } else { // mfence is faster but not present on PIII
|
| @@ -168,7 +168,7 @@ inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
|
| }
|
|
|
| inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
|
| - MemoryBarrier();
|
| + MemoryBarrierInternal();
|
| return *ptr;
|
| }
|
|
|
| @@ -225,7 +225,7 @@ inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
|
|
|
| inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
|
| *ptr = value;
|
| - MemoryBarrier();
|
| + MemoryBarrierInternal();
|
| }
|
|
|
| inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
|
| @@ -262,7 +262,7 @@ inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
|
| }
|
|
|
| inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
|
| - MemoryBarrier();
|
| + MemoryBarrierInternal();
|
| return *ptr;
|
| }
|
|
|
|
|