summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qbasicatomic.h
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2012-02-13 06:49:56 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-13 22:15:40 +0100
commit605339a5dd3b9c5740927ad9af85bb6d0f94c5b7 (patch)
treec5f90affc107cd3f3ba73b520b09f4d604132909 /src/corelib/thread/qbasicatomic.h
parent5c5498ca0d2f8f1876836730b29a98e97a68487e (diff)
Remove qatomic_arch.h
Make qbasicatomic.h include the OS/compiler/processor dependent implementation. For implementations that have not yet been ported to declare a QAtomicOps, they need to #include <QtCore/qoldbasicatomic.h>, and the new QBasicAtomicInteger and QBasicAtomicPointer should not be declared. Change-Id: Ia951834484c9f8dfa75131592e5e716b68ff989b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/thread/qbasicatomic.h')
-rw-r--r--src/corelib/thread/qbasicatomic.h39
1 files changed, 31 insertions, 8 deletions
diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h
index fee7561056..ba9e30b0dc 100644
--- a/src/corelib/thread/qbasicatomic.h
+++ b/src/corelib/thread/qbasicatomic.h
@@ -46,34 +46,58 @@
#if defined(QT_MOC) || defined(QT_BUILD_QMAKE) || defined(QT_RCC) || defined(QT_UIC) || defined(QT_BOOTSTRAPPED)
# include <QtCore/qatomic_bootstrap.h>
+
+// Compiler dependent implementation
#elif defined(Q_CC_MSVC)
# include <QtCore/qatomic_msvc.h>
+
+// Operating system dependent implementation
+#elif defined(Q_OS_INTEGRITY)
+# include "QtCore/qatomic_integrity.h"
+#elif defined(Q_OS_VXWORKS)
+# include "QtCore/qatomic_vxworks.h"
+
+// Processor dependent implementation
+#elif defined(Q_PROCESSOR_ALPHA)
+# include "QtCore/qatomic_alpha.h"
#elif defined(Q_PROCESSOR_ARM_V7)
# include "QtCore/qatomic_armv7.h"
#elif defined(Q_PROCESSOR_ARM_V6)
# include "QtCore/qatomic_armv6.h"
#elif defined(Q_PROCESSOR_ARM_V5)
# include "QtCore/qatomic_armv5.h"
+#elif defined(Q_PROCESSOR_BFIN)
+# include "QtCore/qatomic_bfin.h"
#elif defined(Q_PROCESSOR_IA64)
# include "QtCore/qatomic_ia64.h"
#elif defined(Q_PROCESSOR_MIPS)
# include "QtCore/qatomic_mips.h"
+#elif defined(Q_PROCESSOR_POWERPC)
+# include "QtCore/qatomic_powerpc.h"
+#elif defined(Q_PROCESSOR_S390)
+# include "QtCore/qatomic_s390.h"
+#elif defined(Q_PROCESSOR_SH4A)
+# include "QtCore/qatomic_sh4a.h"
+#elif defined(Q_PROCESSOR_SPARC)
+# include "QtCore/qatomic_sparc.h"
#elif defined(Q_PROCESSOR_X86_32)
# include <QtCore/qatomic_i386.h>
#elif defined(Q_PROCESSOR_X86_64)
# include <QtCore/qatomic_x86_64.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>
+
+// No fallback
#else
-# define QT_OLD_ATOMICS
+# error "Qt has not been ported to this platform"
#endif
-#ifdef QT_OLD_ATOMICS
-# include "QtCore/qoldbasicatomic.h"
-# undef QT_OLD_ATOMICS
-#else
+// Only include if the implementation has been ported to QAtomicOps
+#ifndef QOLDBASICATOMIC_H
QT_BEGIN_HEADER
@@ -234,7 +258,6 @@ QT_END_NAMESPACE
QT_END_HEADER
-#endif // QT_OLD_ATOMICS
-
+#endif // QOLDBASICATOMIC_H
-#endif // QBASIC_ATOMIC
+#endif // QBASICATOMIC_H