From e729b5e31950be6938ea0bbbd12a83a5808a61df Mon Sep 17 00:00:00 2001 From: Hannes Verschore Date: Thu, 4 Sep 2014 11:08:00 +0200 Subject: [PATCH] Bug 1061764 - Atomic should mean no synchronization on windows x86, r=froydnj --- mfbt/Atomics.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mfbt/Atomics.h b/mfbt/Atomics.h index 71d95c61bac7..495a9d3f595e 100644 --- a/mfbt/Atomics.h +++ b/mfbt/Atomics.h @@ -40,7 +40,14 @@ # elif MOZ_USING_LIBCXX # define MOZ_HAVE_CXX11_ATOMICS # endif -#elif defined(_MSC_VER) && _MSC_VER >= 1700 +/* + * Although Visual Studio 2012's CRT supports , its atomic load + * implementation unnecessarily uses an atomic intrinsic for the less + * restrictive memory orderings, which can be prohibitively expensive. + * Therefore, we require at least Visual Studio 2013 for using the CRT + * (bug 1061764). + */ +#elif defined(_MSC_VER) && _MSC_VER >= 1800 # if defined(DEBUG) /* * Provide our own failure code since we're having trouble linking to