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

Unified Diff: third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_generic_c11_atomic.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_generic_c11_atomic.h
diff --git a/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_pnacl.h b/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h
similarity index 96%
rename from third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_pnacl.h
rename to third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h
index 3b314fd0c9af5c6c4b582d304cd098a2f380a3fe..44ef9c9e03512c34a5ae237ef78481bb43d20501 100644
--- a/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_pnacl.h
+++ b/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h
@@ -30,8 +30,8 @@
// This file is an internal atomic implementation, use atomicops.h instead.
-#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_PNACL_H_
-#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_PNACL_H_
+#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_C11_ATOMIC_H_
+#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_C11_ATOMIC_H_
#include <atomic>
@@ -52,7 +52,7 @@ typedef volatile std::atomic<Atomic32>* AtomicLocation32;
static_assert(sizeof(*(AtomicLocation32) nullptr) == sizeof(Atomic32),
"incompatible 32-bit atomic layout");
-inline void MemoryBarrier() {
+inline void MemoryBarrierInternal() {
#if defined(__GLIBCXX__)
// Work around libstdc++ bug 51038 where atomic_thread_fence was declared but
// not defined, leading to the linker complaining about undefined references.
@@ -119,7 +119,7 @@ inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
((AtomicLocation32)ptr)->store(value, std::memory_order_relaxed);
- MemoryBarrier();
+ MemoryBarrierInternal();
}
inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
@@ -135,7 +135,7 @@ inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
}
inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return ((AtomicLocation32)ptr)->load(std::memory_order_relaxed);
}
@@ -202,7 +202,7 @@ inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
((AtomicLocation64)ptr)->store(value, std::memory_order_relaxed);
- MemoryBarrier();
+ MemoryBarrierInternal();
}
inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
@@ -218,7 +218,7 @@ inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
}
inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
- MemoryBarrier();
+ MemoryBarrierInternal();
return ((AtomicLocation64)ptr)->load(std::memory_order_relaxed);
}
@@ -228,4 +228,4 @@ inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
} // namespace protobuf
} // namespace google
-#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_PNACL_H_
+#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_C11_ATOMIC_H_

Powered by Google App Engine
This is Rietveld 408576698