summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qbasicatomic.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-01-15 15:16:53 -0800
committerThiago Macieira <thiago.macieira@intel.com>2015-03-05 00:05:00 +0000
commit212285639d748c7def8648f89b8c1c21c5f481e6 (patch)
treee283c0e0e99fb5aee81a2364f4ed00478bc26b36 /src/corelib/thread/qbasicatomic.h
parent126d489f7f561bc3967ee2a36624c3b1fa26f974 (diff)
Add missing fetchAndXxx methods to atomic classes based on std::atomic
And add tests for the GCC intrinsics and for std::atomic. Task-number: QTBUG-43794 Change-Id: Ic5d393bfd36e48a193fcffff13b9b2dbaee80469 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/thread/qbasicatomic.h')
-rw-r--r--src/corelib/thread/qbasicatomic.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h
index 16a27862c2..ecf39d699f 100644
--- a/src/corelib/thread/qbasicatomic.h
+++ b/src/corelib/thread/qbasicatomic.h
@@ -39,6 +39,14 @@
#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)
+# include <QtCore/qatomic_cxx11.h>
+#elif defined(QT_ATOMIC_FORCE_GCC)
+# include <QtCore/qatomic_gcc.h>
+
// Compiler dependent implementation
#elif defined(Q_CC_MSVC)
# include <QtCore/qatomic_msvc.h>