summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@sosco.com>2009-11-06 12:44:04 (GMT)
committerShane Kearns <shane.kearns@sosco.com>2009-11-06 12:55:56 (GMT)
commitd92084a576c0f85e64da7ac5c1a51bfb0969af75 (patch)
tree6ac736bf5fe1b3e4a8228260d7e5e483d2fbf23e /src/corelib
parent7442be794787c710812d46052b74d73042795aac (diff)
downloadQt-d92084a576c0f85e64da7ac5c1a51bfb0969af75.zip
Qt-d92084a576c0f85e64da7ac5c1a51bfb0969af75.tar.gz
Qt-d92084a576c0f85e64da7ac5c1a51bfb0969af75.tar.bz2
Fix functions that return whether atomics are natives following review comments
Reviewed-By: Brad
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/arch/qatomic_symbian.h31
-rw-r--r--src/corelib/arch/symbian/qatomic_symbian.cpp63
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