Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.h

Issue 2495533002: third_party/protobuf: Update to HEAD (83d681ee2c) (Closed)
Patch Set: Make chrome settings proto generated file a component Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698