From: Bradley T. Hughes Date: Mon, 13 Feb 2012 05:49:56 +0000 (+0100) Subject: Remove qatomic_arch.h X-Git-Tag: qt-v5.0.0-alpha1~1124 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=605339a5dd3b9c5740927ad9af85bb6d0f94c5b7;p=profile%2Fivi%2Fqtbase.git 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 , and the new QBasicAtomicInteger and QBasicAtomicPointer should not be declared. Change-Id: Ia951834484c9f8dfa75131592e5e716b68ff989b Reviewed-by: Thiago Macieira --- diff --git a/src/corelib/arch/arch.pri b/src/corelib/arch/arch.pri index 825df37..2a4fddb 100644 --- a/src/corelib/arch/arch.pri +++ b/src/corelib/arch/arch.pri @@ -13,7 +13,6 @@ integrity:HEADERS += arch/qatomic_integrity.h !wince*:!win32:!mac:HEADERS += arch/qatomic_alpha.h \ arch/qatomic_ia64.h \ arch/qatomic_sparc.h \ - arch/qatomic_arch.h \ arch/qatomic_powerpc.h \ arch/qatomic_armv5.h \ arch/qatomic_armv6.h \ diff --git a/src/corelib/arch/qatomic_alpha.h b/src/corelib/arch/qatomic_alpha.h index 7954644..0ac2d8d 100644 --- a/src/corelib/arch/qatomic_alpha.h +++ b/src/corelib/arch/qatomic_alpha.h @@ -42,6 +42,8 @@ #ifndef QATOMIC_ALPHA_H #define QATOMIC_ALPHA_H +#include + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/corelib/arch/qatomic_arch.h b/src/corelib/arch/qatomic_arch.h deleted file mode 100644 index 9219ad1..0000000 --- a/src/corelib/arch/qatomic_arch.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the QtCore module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QATOMIC_ARCH_H -#define QATOMIC_ARCH_H - -QT_BEGIN_HEADER - -#include "QtCore/qglobal.h" - -#if defined(QT_ARCH_INTEGRITY) -# include "QtCore/qatomic_integrity.h" -#elif defined(QT_ARCH_VXWORKS) -# include "QtCore/qatomic_vxworks.h" -#elif defined(QT_ARCH_ALPHA) -# include "QtCore/qatomic_alpha.h" -#elif defined(QT_ARCH_BFIN) -# include "QtCore/qatomic_bfin.h" -#elif defined(QT_ARCH_POWERPC) -# include "QtCore/qatomic_powerpc.h" -#elif defined(QT_ARCH_S390) -# include "QtCore/qatomic_s390.h" -#elif defined(QT_ARCH_SPARC) -# include "QtCore/qatomic_sparc.h" -#elif defined(QT_ARCH_SH4A) -# include "QtCore/qatomic_sh4a.h" -#else -# error "Qt has not been ported to this architecture" -#endif - -QT_END_HEADER - -#endif // QATOMIC_ARCH_H diff --git a/src/corelib/arch/qatomic_bfin.h b/src/corelib/arch/qatomic_bfin.h index 530ac8d..28a5cd6 100644 --- a/src/corelib/arch/qatomic_bfin.h +++ b/src/corelib/arch/qatomic_bfin.h @@ -42,6 +42,8 @@ #ifndef QATOMIC_BFIN_H #define QATOMIC_BFIN_H +#include + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/corelib/arch/qatomic_integrity.h b/src/corelib/arch/qatomic_integrity.h index e5d226a..f290984 100644 --- a/src/corelib/arch/qatomic_integrity.h +++ b/src/corelib/arch/qatomic_integrity.h @@ -42,6 +42,7 @@ #ifndef QATOMIC_INTEGRITY_H #define QATOMIC_INTEGRITY_H +#include #include QT_BEGIN_HEADER diff --git a/src/corelib/arch/qatomic_powerpc.h b/src/corelib/arch/qatomic_powerpc.h index f03539d..10f6e4c 100644 --- a/src/corelib/arch/qatomic_powerpc.h +++ b/src/corelib/arch/qatomic_powerpc.h @@ -42,6 +42,8 @@ #ifndef QATOMIC_POWERPC_H #define QATOMIC_POWERPC_H +#include + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/corelib/arch/qatomic_s390.h b/src/corelib/arch/qatomic_s390.h index b6246e8..ef7ab34 100644 --- a/src/corelib/arch/qatomic_s390.h +++ b/src/corelib/arch/qatomic_s390.h @@ -42,6 +42,8 @@ #ifndef QATOMIC_S390_H #define QATOMIC_S390_H +#include + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/corelib/arch/qatomic_sh4a.h b/src/corelib/arch/qatomic_sh4a.h index 042a602..d00b9ad 100644 --- a/src/corelib/arch/qatomic_sh4a.h +++ b/src/corelib/arch/qatomic_sh4a.h @@ -42,6 +42,8 @@ #ifndef QATOMIC_SH4A_H #define QATOMIC_SH4A_H +#include + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/corelib/arch/qatomic_sparc.h b/src/corelib/arch/qatomic_sparc.h index 5fc640e..6328229 100644 --- a/src/corelib/arch/qatomic_sparc.h +++ b/src/corelib/arch/qatomic_sparc.h @@ -42,6 +42,8 @@ #ifndef QATOMIC_SPARC_H #define QATOMIC_SPARC_H +#include + QT_BEGIN_HEADER QT_BEGIN_NAMESPACE diff --git a/src/corelib/arch/qatomic_vxworks.h b/src/corelib/arch/qatomic_vxworks.h index c18563e..dbec16a 100644 --- a/src/corelib/arch/qatomic_vxworks.h +++ b/src/corelib/arch/qatomic_vxworks.h @@ -48,6 +48,8 @@ QT_BEGIN_HEADER # include #else // generic implementation with taskLock() +#include + #if 0 // we don't want to include the system header here for two function prototypes, // because it pulls in a _lot_ of stuff that pollutes the global namespace diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h index fee7561..ba9e30b 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 + +// Compiler dependent implementation #elif defined(Q_CC_MSVC) # include + +// 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 #elif defined(Q_PROCESSOR_X86_64) # include + +// Fallback compiler dependent implementation #elif defined(Q_COMPILER_ATOMICS) && defined(Q_COMPILER_CONSTEXPR) # include #elif defined(Q_CC_GNU) # include + +// 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 diff --git a/src/corelib/thread/qoldbasicatomic.h b/src/corelib/thread/qoldbasicatomic.h index 7482d95..4df07ad 100644 --- a/src/corelib/thread/qoldbasicatomic.h +++ b/src/corelib/thread/qoldbasicatomic.h @@ -144,6 +144,4 @@ public: QT_END_NAMESPACE QT_END_HEADER -# include - -#endif // QBASIC_ATOMIC +#endif // QOLDBASICATOMIC_H