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

Side by Side Diff: base/atomicops_internals_portable.h

Issue 981803003: base: Add/Fix namespace closing comments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file is an internal atomic implementation, use atomicops.h instead. 5 // This file is an internal atomic implementation, use atomicops.h instead.
6 // 6 //
7 // This implementation uses C++11 atomics' member functions. The code base is 7 // This implementation uses C++11 atomics' member functions. The code base is
8 // currently written assuming atomicity revolves around accesses instead of 8 // currently written assuming atomicity revolves around accesses instead of
9 // C++11's memory locations. The burden is on the programmer to ensure that all 9 // C++11's memory locations. The burden is on the programmer to ensure that all
10 // memory locations accessed atomically are never accessed non-atomically (tsan 10 // memory locations accessed atomically are never accessed non-atomically (tsan
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) { 214 inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
215 return ((AtomicLocation64)ptr)->load(std::memory_order_acquire); 215 return ((AtomicLocation64)ptr)->load(std::memory_order_acquire);
216 } 216 }
217 217
218 inline Atomic64 Release_Load(volatile const Atomic64* ptr) { 218 inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
219 MemoryBarrier(); 219 MemoryBarrier();
220 return ((AtomicLocation64)ptr)->load(std::memory_order_relaxed); 220 return ((AtomicLocation64)ptr)->load(std::memory_order_relaxed);
221 } 221 }
222 222
223 #endif // defined(ARCH_CPU_64_BITS) 223 #endif // defined(ARCH_CPU_64_BITS)
224 } 224 } // namespace subtle
225 } // namespace base::subtle 225 } // namespace base
Nico 2015/03/06 22:11:17 totally valid c++17 :-P
226 226
227 #endif // BASE_ATOMICOPS_INTERNALS_PORTABLE_H_ 227 #endif // BASE_ATOMICOPS_INTERNALS_PORTABLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698