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

Side by Side Diff: third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_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 unified diff | Download patch
OLDNEW
1 // Protocol Buffers - Google's data interchange format 1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2012 Google Inc. All rights reserved. 2 // Copyright 2012 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/ 3 // https://developers.google.com/protocol-buffers/
4 // 4 //
5 // Redistribution and use in source and binary forms, with or without 5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are 6 // modification, are permitted provided that the following conditions are
7 // met: 7 // met:
8 // 8 //
9 // * Redistributions of source code must retain the above copyright 9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer. 10 // notice, this list of conditions and the following disclaimer.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr, 108 inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
109 Atomic32 old_value, 109 Atomic32 old_value,
110 Atomic32 new_value) { 110 Atomic32 new_value) {
111 return NoBarrier_CompareAndSwap(ptr, old_value, new_value); 111 return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
112 } 112 }
113 113
114 inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) { 114 inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
115 *ptr = value; 115 *ptr = value;
116 } 116 }
117 117
118 inline void MemoryBarrier() { 118 inline void MemoryBarrierInternal() {
119 pLinuxKernelMemoryBarrier(); 119 pLinuxKernelMemoryBarrier();
120 } 120 }
121 121
122 inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) { 122 inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
123 *ptr = value; 123 *ptr = value;
124 MemoryBarrier(); 124 MemoryBarrierInternal();
125 } 125 }
126 126
127 inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) { 127 inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
128 MemoryBarrier(); 128 MemoryBarrierInternal();
129 *ptr = value; 129 *ptr = value;
130 } 130 }
131 131
132 inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) { 132 inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
133 return *ptr; 133 return *ptr;
134 } 134 }
135 135
136 inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) { 136 inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
137 Atomic32 value = *ptr; 137 Atomic32 value = *ptr;
138 MemoryBarrier(); 138 MemoryBarrierInternal();
139 return value; 139 return value;
140 } 140 }
141 141
142 inline Atomic32 Release_Load(volatile const Atomic32* ptr) { 142 inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
143 MemoryBarrier(); 143 MemoryBarrierInternal();
144 return *ptr; 144 return *ptr;
145 } 145 }
146 146
147 } // namespace internal 147 } // namespace internal
148 } // namespace protobuf 148 } // namespace protobuf
149 } // namespace google 149 } // namespace google
150 150
151 #endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_ARM_GCC_H_ 151 #endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_ARM_GCC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698