summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qbasicatomic.h
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-10-23 14:01:35 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-10-23 14:45:03 +0200
commit790aef362fd195adf97d8c780a7cbbbade27d51f (patch)
tree8be464687ab21806cfe9f7ada27098b563aa41b2 /src/corelib/thread/qbasicatomic.h
parent9720efbd1035c2e939b0581163e6d804c713dd96 (diff)
parent07475c662eb73c833da2d461b8ef2702ca1e2cfb (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: .qmake.conf configure src/corelib/global/qglobal.h src/tools/qdoc/node.cpp src/tools/qdoc/qdocdatabase.cpp tests/auto/corelib/io/qsettings/tst_qsettings.cpp tools/configure/configureapp.cpp Change-Id: I66028ae5e441a06b73ee85ba72a03a3af3e8593f
Diffstat (limited to 'src/corelib/thread/qbasicatomic.h')
-rw-r--r--src/corelib/thread/qbasicatomic.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h
index ecf39d699f..a747134df3 100644
--- a/src/corelib/thread/qbasicatomic.h
+++ b/src/corelib/thread/qbasicatomic.h
@@ -39,11 +39,13 @@
#if defined(QT_BOOTSTRAPPED)
# include <QtCore/qatomic_bootstrap.h>
-// The following two are used for testing only.
-// Note that we don't check the compiler support -- you had better
-// know what you're doing if you set them
-#elif defined(QT_ATOMIC_FORCE_CXX11)
+// If C++11 atomics are supported, use them!
+#elif defined(Q_COMPILER_ATOMICS) && defined(Q_COMPILER_CONSTEXPR) && !defined(QT_ATOMIC_FORCE_NO_CXX11)
# include <QtCore/qatomic_cxx11.h>
+
+// The following is used for testing only.
+// Note that we don't check the compiler support -- you had better
+// know what you're doing if you set it
#elif defined(QT_ATOMIC_FORCE_GCC)
# include <QtCore/qatomic_gcc.h>
@@ -66,8 +68,6 @@
# include <QtCore/qatomic_x86.h>
// Fallback compiler dependent implementation
-#elif defined(Q_COMPILER_ATOMICS) && defined(Q_COMPILER_CONSTEXPR)
-# include <QtCore/qatomic_cxx11.h>
#elif defined(Q_CC_GNU)
# include <QtCore/qatomic_gcc.h>