diff options
author | Shane Kearns <shane.kearns@sosco.com> | 2009-11-06 12:44:04 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-11-13 10:57:52 (GMT) |
commit | 99c42254480fb147b0aaa01458300bae4472e3d8 (patch) | |
tree | f794dd7f6fa7d18e11ff6dfde08777598248afb4 | |
parent | a53bbbf81ce2dbce143ebc08fd91418e51a44588 (diff) | |
download | Qt-99c42254480fb147b0aaa01458300bae4472e3d8.zip Qt-99c42254480fb147b0aaa01458300bae4472e3d8.tar.gz Qt-99c42254480fb147b0aaa01458300bae4472e3d8.tar.bz2 |
Fix functions that return whether atomics are natives following review comments
Reviewed-By: Brad
-rw-r--r-- | src/corelib/arch/qatomic_symbian.h | 31 | ||||
-rw-r--r-- | src/corelib/arch/symbian/qatomic_symbian.cpp | 63 |
2 files changed, 76 insertions, 18 deletions
diff --git a/src/corelib/arch/qatomic_symbian.h b/src/corelib/arch/qatomic_symbian.h index 571f628..92f6ef9 100644 --- a/src/corelib/arch/qatomic_symbian.h +++ b/src/corelib/arch/qatomic_symbian.h @@ -51,57 +51,52 @@ QT_BEGIN_NAMESPACE QT_MODULE(Core) -#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_NOT_NATIVE +#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_SOMETIMES_NATIVE -inline bool QBasicAtomicInt::isReferenceCountingNative() -{ return false; } inline bool QBasicAtomicInt::isReferenceCountingWaitFree() { return false; } -#define Q_ATOMIC_INT_TEST_AND_SET_IS_NOT_NATIVE +#define Q_ATOMIC_INT_TEST_AND_SET_IS_SOMETIMES_NATIVE -inline bool QBasicAtomicInt::isTestAndSetNative() -{ return false; } inline bool QBasicAtomicInt::isTestAndSetWaitFree() { return false; } -#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_NOT_NATIVE +#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_SOMETIMES_NATIVE -inline bool QBasicAtomicInt::isFetchAndStoreNative() -{ return false; } inline bool QBasicAtomicInt::isFetchAndStoreWaitFree() { return false; } -#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_NOT_NATIVE +#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_SOMETIMES_NATIVE -inline bool QBasicAtomicInt::isFetchAndAddNative() -{ return false; } inline bool QBasicAtomicInt::isFetchAndAddWaitFree() { return false; } -#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_NOT_NATIVE +#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_SOMETIMES_NATIVE +Q_CORE_EXPORT bool QBasicAtomicPointer_isTestAndSetNative(); template <typename T> Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetNative() -{ return false; } +{ return QBasicAtomicPointer_isTestAndSetNative(); } template <typename T> Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetWaitFree() { return false; } -#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_NOT_NATIVE +#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_SOMETIMES_NATIVE +Q_CORE_EXPORT bool QBasicAtomicPointer_isFetchAndStoreNative(); template <typename T> Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreNative() -{ return false; } +{ return QBasicAtomicPointer_isFetchAndStoreNative(); } template <typename T> Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreWaitFree() { return false; } -#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_NOT_NATIVE +#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_SOMETIMES_NATIVE +Q_CORE_EXPORT bool QBasicAtomicPointer_isFetchAndAddNative(); template <typename T> Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddNative() -{ return false; } +{ return QBasicAtomicPointer_isFetchAndAddNative(); } template <typename T> Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree() { return false; } diff --git a/src/corelib/arch/symbian/qatomic_symbian.cpp b/src/corelib/arch/symbian/qatomic_symbian.cpp index 2ab5ae9..91b49c7 100644 --- a/src/corelib/arch/symbian/qatomic_symbian.cpp +++ b/src/corelib/arch/symbian/qatomic_symbian.cpp @@ -77,6 +77,69 @@ struct QSymbianPrintExitInfo TInt initThreadHandleCount; } symbian_printExitInfo; +Q_CORE_EXPORT bool QBasicAtomicInt::isReferenceCountingNative() +{ +#ifdef QT_HAVE_ARMV6 + return true; +#else + return false; +#endif +} + +Q_CORE_EXPORT bool QBasicAtomicInt::isTestAndSetNative() +{ +#ifdef QT_HAVE_ARMV6 + return true; +#else + return false; +#endif +} + +Q_CORE_EXPORT bool QBasicAtomicInt::isFetchAndStoreNative() +{ +#ifdef QT_HAVE_ARMV6 + return true; +#else + return false; +#endif +} + +Q_CORE_EXPORT bool QBasicAtomicInt::isFetchAndAddNative() +{ +#ifdef QT_HAVE_ARMV6 + return true; +#else + return false; +#endif +} + +Q_CORE_EXPORT bool QBasicAtomicPointer_isTestAndSetNative() +{ +#ifdef QT_HAVE_ARMV6 + return true; +#else + return false; +#endif +} + +Q_CORE_EXPORT bool QBasicAtomicPointer_isFetchAndStoreNative() +{ +#ifdef QT_HAVE_ARMV6 + return true; +#else + return false; +#endif +} + +Q_CORE_EXPORT bool QBasicAtomicPointer_isFetchAndAddNative() +{ +#ifdef QT_HAVE_ARMV6 + return true; +#else + return false; +#endif +} + //For ARMv6, the generic atomics are machine coded #ifndef QT_HAVE_ARMV6 |