OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // For atomic operations on reference counts, see atomic_refcount.h. | 5 // For atomic operations on reference counts, see atomic_refcount.h. |
6 // For atomic operations on sequence numbers, see atomic_sequence_num.h. | 6 // For atomic operations on sequence numbers, see atomic_sequence_num.h. |
7 | 7 |
8 // The routines exported by this module are subtle. If you use them, even if | 8 // The routines exported by this module are subtle. If you use them, even if |
9 // you get the code right, it will depend on careful reasoning about atomicity | 9 // you get the code right, it will depend on careful reasoning about atomicity |
10 // and memory ordering; it will be less readable, and harder to maintain. If | 10 // and memory ordering; it will be less readable, and harder to maintain. If |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 void Release_Store(volatile Atomic64* ptr, Atomic64 value); | 121 void Release_Store(volatile Atomic64* ptr, Atomic64 value); |
122 Atomic64 NoBarrier_Load(volatile const Atomic64* ptr); | 122 Atomic64 NoBarrier_Load(volatile const Atomic64* ptr); |
123 Atomic64 Acquire_Load(volatile const Atomic64* ptr); | 123 Atomic64 Acquire_Load(volatile const Atomic64* ptr); |
124 Atomic64 Release_Load(volatile const Atomic64* ptr); | 124 Atomic64 Release_Load(volatile const Atomic64* ptr); |
125 #endif // ARCH_CPU_64_BITS | 125 #endif // ARCH_CPU_64_BITS |
126 | 126 |
127 } // namespace base::subtle | 127 } // namespace base::subtle |
128 } // namespace base | 128 } // namespace base |
129 | 129 |
130 // Include our platform specific implementation. | 130 // Include our platform specific implementation. |
131 #if defined(OS_WIN) && defined(COMPILER_MSVC) && defined(ARCH_CPU_X86_FAMILY) | 131 #if defined(THREAD_SANITIZER) |
| 132 #include "base/atomicops_internals_tsan.h" |
| 133 #elif defined(OS_WIN) && defined(COMPILER_MSVC) && defined(ARCH_CPU_X86_FAMILY) |
132 #include "base/atomicops_internals_x86_msvc.h" | 134 #include "base/atomicops_internals_x86_msvc.h" |
133 #elif defined(OS_MACOSX) | 135 #elif defined(OS_MACOSX) |
134 #include "base/atomicops_internals_mac.h" | 136 #include "base/atomicops_internals_mac.h" |
135 #elif (defined(COMPILER_GCC) && defined(ARCH_CPU_ARM_FAMILY)) || \ | 137 #elif (defined(COMPILER_GCC) && defined(ARCH_CPU_ARM_FAMILY)) || \ |
136 defined(OS_NACL) | 138 defined(OS_NACL) |
137 #include "base/atomicops_internals_gcc.h" | 139 #include "base/atomicops_internals_gcc.h" |
138 #elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY) | 140 #elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY) |
139 #include "base/atomicops_internals_x86_gcc.h" | 141 #include "base/atomicops_internals_x86_gcc.h" |
140 #elif defined(COMPILER_GCC) && defined(ARCH_CPU_MIPS_FAMILY) | 142 #elif defined(COMPILER_GCC) && defined(ARCH_CPU_MIPS_FAMILY) |
141 #include "base/atomicops_internals_mips_gcc.h" | 143 #include "base/atomicops_internals_mips_gcc.h" |
142 #else | 144 #else |
143 #error "Atomic operations are not supported on your platform" | 145 #error "Atomic operations are not supported on your platform" |
144 #endif | 146 #endif |
145 | 147 |
146 // On some platforms we need additional declarations to make | 148 // On some platforms we need additional declarations to make |
147 // AtomicWord compatible with our other Atomic* types. | 149 // AtomicWord compatible with our other Atomic* types. |
148 #if defined(OS_MACOSX) || defined(OS_OPENBSD) | 150 #if defined(OS_MACOSX) || defined(OS_OPENBSD) |
149 #include "base/atomicops_internals_atomicword_compat.h" | 151 #include "base/atomicops_internals_atomicword_compat.h" |
150 #endif | 152 #endif |
151 | 153 |
152 #endif // BASE_ATOMICOPS_H_ | 154 #endif // BASE_ATOMICOPS_H_ |
OLD | NEW |