| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 } // namespace base::subtle | 136 } // namespace base::subtle |
| 137 } // namespace base | 137 } // namespace base |
| 138 | 138 |
| 139 // Include our platform specific implementation. | 139 // Include our platform specific implementation. |
| 140 #if defined(THREAD_SANITIZER) | 140 #if defined(THREAD_SANITIZER) |
| 141 #include "base/atomicops_internals_tsan.h" | 141 #include "base/atomicops_internals_tsan.h" |
| 142 #elif defined(OS_WIN) && defined(COMPILER_MSVC) && defined(ARCH_CPU_X86_FAMILY) | 142 #elif defined(OS_WIN) && defined(COMPILER_MSVC) && defined(ARCH_CPU_X86_FAMILY) |
| 143 #include "base/atomicops_internals_x86_msvc.h" | 143 #include "base/atomicops_internals_x86_msvc.h" |
| 144 #elif defined(OS_MACOSX) | 144 #elif defined(OS_MACOSX) |
| 145 #include "base/atomicops_internals_mac.h" | 145 #include "base/atomicops_internals_mac.h" |
| 146 #elif (defined(COMPILER_GCC) && defined(ARCH_CPU_ARM_FAMILY)) || \ | |
| 147 defined(OS_NACL) | |
| 148 #include "base/atomicops_internals_gcc.h" | |
| 149 #elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY) | 146 #elif defined(COMPILER_GCC) && defined(ARCH_CPU_X86_FAMILY) |
| 150 #include "base/atomicops_internals_x86_gcc.h" | 147 #include "base/atomicops_internals_x86_gcc.h" |
| 148 #elif defined(COMPILER_GCC) && defined(OS_NACL) |
| 149 #include "base/atomicops_internals_gcc.h" |
| 150 #elif defined(COMPILER_GCC) && defined(ARCH_CPU_ARM_FAMILY) |
| 151 #include "base/atomicops_internals_arm_gcc.h" |
| 151 #elif defined(COMPILER_GCC) && defined(ARCH_CPU_MIPS_FAMILY) | 152 #elif defined(COMPILER_GCC) && defined(ARCH_CPU_MIPS_FAMILY) |
| 152 #include "base/atomicops_internals_mips_gcc.h" | 153 #include "base/atomicops_internals_mips_gcc.h" |
| 153 #else | 154 #else |
| 154 #error "Atomic operations are not supported on your platform" | 155 #error "Atomic operations are not supported on your platform" |
| 155 #endif | 156 #endif |
| 156 | 157 |
| 157 // On some platforms we need additional declarations to make | 158 // On some platforms we need additional declarations to make |
| 158 // AtomicWord compatible with our other Atomic* types. | 159 // AtomicWord compatible with our other Atomic* types. |
| 159 #if defined(OS_MACOSX) || defined(OS_OPENBSD) | 160 #if defined(OS_MACOSX) || defined(OS_OPENBSD) |
| 160 #include "base/atomicops_internals_atomicword_compat.h" | 161 #include "base/atomicops_internals_atomicword_compat.h" |
| 161 #endif | 162 #endif |
| 162 | 163 |
| 163 #endif // BASE_ATOMICOPS_H_ | 164 #endif // BASE_ATOMICOPS_H_ |
| OLD | NEW |