From 212285639d748c7def8648f89b8c1c21c5f481e6 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 15 Jan 2015 15:16:53 -0800 Subject: 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) --- src/corelib/thread/qbasicatomic.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/corelib/thread') 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 +// 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 +#elif defined(QT_ATOMIC_FORCE_GCC) +# include + // Compiler dependent implementation #elif defined(Q_CC_MSVC) # include -- cgit v1.2.3