Chromium Code Reviews| Index: base/atomicops.h |
| diff --git a/base/atomicops.h b/base/atomicops.h |
| index f983b455f193d2227b72c42e10caa8ba18708772..fc48a7019b288fb19df4059ace397de3dbf345ce 100644 |
| --- a/base/atomicops.h |
| +++ b/base/atomicops.h |
| @@ -144,27 +144,14 @@ Atomic64 Release_Load(volatile const Atomic64* ptr); |
| } // namespace subtle |
| } // namespace base |
| -// Try to use a portable implementation based on C++11 atomics. |
| -// |
| -// Some toolchains support C++11 language features without supporting library |
| -// features (recent compiler, older STL). Whitelist libstdc++ and libc++ that we |
| -// know will have <atomic> when compiling C++11. |
| -#if ((__cplusplus >= 201103L) && \ |
| - ((defined(__GLIBCXX__) && (__GLIBCXX__ > 20110216)) || \ |
| - (defined(_LIBCPP_VERSION) && (_LIBCPP_STD_VER >= 11)))) |
| +#if (defined(OS_WIN) && defined(COMPILER_MSVC) && \ |
|
Nico
2015/12/07 03:55:58
OS_WIN implies COMPILER_MSVC, remove the COMPILER_
JF
2015/12/07 04:23:31
That's true when using LLVM on Windows as well? I'
Nico
2015/12/07 04:58:28
Yes. Just like clang defines__gnuc__ when using th
|
| + defined(ARCH_CPU_X86_FAMILY)) |
|
Nico
2015/12/07 03:55:58
We don't have a win/arm build either, so you can g
JF
2015/12/07 04:23:31
Removed, you're right it shouldn't have been there
|
| +// TODO(jfb): The MSVC header includes windows.h, which other files end up |
| +// relying on. Fix this as part of crbug.com/559247. |
| +# include "base/atomicops_internals_x86_msvc.h" |
| +#else |
| # include "base/atomicops_internals_portable.h" |
| -#else // Otherwise use a platform specific implementation. |
| -# if defined(THREAD_SANITIZER) |
| -# error "Thread sanitizer must use the portable atomic operations" |
| -# elif (defined(OS_WIN) && defined(COMPILER_MSVC) && \ |
| - defined(ARCH_CPU_X86_FAMILY)) |
| -# include "base/atomicops_internals_x86_msvc.h" |
| -# elif defined(OS_MACOSX) |
| -# include "base/atomicops_internals_mac.h" |
| -# else |
| -# error "Atomic operations are not supported on your platform" |
| -# endif |
| -#endif // Portable / non-portable includes. |
| +#endif |
| // On some platforms we need additional declarations to make |
| // AtomicWord compatible with our other Atomic* types. |