diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-03-15 16:19:10 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-03-15 16:27:17 (GMT) |
commit | 643f80ec50ada93b4f0a5771e6260fd32efa3e54 (patch) | |
tree | d2cc5ae59dba13115e83430e175adc881c69f4b8 /src/corelib/arch/armv6 | |
parent | 56e872353f5c496b27d3e9e614e3d3fea0ae8987 (diff) | |
download | Qt-643f80ec50ada93b4f0a5771e6260fd32efa3e54.zip Qt-643f80ec50ada93b4f0a5771e6260fd32efa3e54.tar.gz Qt-643f80ec50ada93b4f0a5771e6260fd32efa3e54.tar.bz2 |
Implement symbian^3 e32atomics API
Symbian^3 provides an enhanced atomics API, which provides relaxed,
acquire, release, ordered versions of each atomic operation.
The armv5 and armv6 assembly atomics previously used in Qt are not SMP
safe. The atomics provided by the OS will be SMP safe when using the SMP
kernel, or similar ARM assembly implementations when using the uniprocessor
kernel.
Task-number: QTBUG-7655
Reviewed-by: mread
Diffstat (limited to 'src/corelib/arch/armv6')
-rw-r--r-- | src/corelib/arch/armv6/qatomic_generic_armv6.cpp | 212 |
1 files changed, 212 insertions, 0 deletions
diff --git a/src/corelib/arch/armv6/qatomic_generic_armv6.cpp b/src/corelib/arch/armv6/qatomic_generic_armv6.cpp index f638891..39d966a 100644 --- a/src/corelib/arch/armv6/qatomic_generic_armv6.cpp +++ b/src/corelib/arch/armv6/qatomic_generic_armv6.cpp @@ -46,6 +46,7 @@ #include <QtCore/qglobal.h> #ifdef QT_HAVE_ARMV6 +#ifndef SYMBIAN_E32_ATOMIC_API QT_BEGIN_NAMESPACE @@ -55,6 +56,24 @@ QT_USE_NAMESPACE #pragma push #pragma arm Q_CORE_EXPORT asm +bool QBasicAtomicInt_testAndSetRelaxed(volatile int *_q_value, int expectedValue, int newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +bool QBasicAtomicInt_testAndSetAcquire(volatile int *_q_value, int expectedValue, int newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +bool QBasicAtomicInt_testAndSetRelease(volatile int *_q_value, int expectedValue, int newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm bool QBasicAtomicInt_testAndSetOrdered(volatile int *_q_value, int expectedValue, int newValue) { CODE32 @@ -73,6 +92,24 @@ retry_testAndSetOrdered } Q_CORE_EXPORT asm +int QBasicAtomicInt_fetchAndStoreRelaxed(volatile int *_q_value, int newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +int QBasicAtomicInt_fetchAndStoreAcquire(volatile int *_q_value, int newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +int QBasicAtomicInt_fetchAndStoreRelease(volatile int *_q_value, int newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *_q_value, int newValue) { CODE32 @@ -88,6 +125,24 @@ retry_fetchAndStoreOrdered } Q_CORE_EXPORT asm +int QBasicAtomicInt_fetchAndAddRelaxed(volatile int *_q_value, int valueToAdd) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +int QBasicAtomicInt_fetchAndAddAcquire(volatile int *_q_value, int valueToAdd) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +int QBasicAtomicInt_fetchAndAddRelease(volatile int *_q_value, int valueToAdd) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm int QBasicAtomicInt_fetchAndAddOrdered(volatile int *_q_value, int valueToAdd) { CODE32 @@ -105,6 +160,30 @@ retry_fetchAndAddOrdered } Q_CORE_EXPORT asm +bool QBasicAtomicPointer_testAndSetRelaxed(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +bool QBasicAtomicPointer_testAndSetRelease(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +bool QBasicAtomicPointer_testAndSetAcquire(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *_q_value, void *expectedValue, void *newValue) @@ -125,6 +204,24 @@ retryPointer_testAndSetOrdered } Q_CORE_EXPORT asm +void *QBasicAtomicPointer_fetchAndStoreRelaxed(void * volatile *_q_value, void *newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +void *QBasicAtomicPointer_fetchAndStoreAcquire(void * volatile *_q_value, void *newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +void *QBasicAtomicPointer_fetchAndStoreRelease(void * volatile *_q_value, void *newValue) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm void *QBasicAtomicPointer_fetchAndStoreOrdered(void * volatile *_q_value, void *newValue) { CODE32 @@ -140,6 +237,24 @@ retryPointer_fetchAndStoreOrdered } Q_CORE_EXPORT asm +void *QBasicAtomicPointer_fetchAndAddRelaxed(void * volatile *_q_value, qptrdiff valueToAdd) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +void *QBasicAtomicPointer_fetchAndAddRelease(void * volatile *_q_value, qptrdiff valueToAdd) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm +void *QBasicAtomicPointer_fetchAndAddAcquire(void * volatile *_q_value, qptrdiff valueToAdd) +{ + CODE32 + //fall through +} +Q_CORE_EXPORT asm void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *_q_value, qptrdiff valueToAdd) { CODE32 @@ -159,6 +274,21 @@ retryPointer_fetchAndAddOrdered #pragma pop #elif defined (Q_CC_GCCE) Q_CORE_EXPORT __declspec( naked ) +bool QBasicAtomicInt_testAndSetRelaxed(volatile int *_q_value, int expectedValue, int newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +bool QBasicAtomicInt_testAndSetAcquire(volatile int *_q_value, int expectedValue, int newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +bool QBasicAtomicInt_testAndSetRelease(volatile int *_q_value, int expectedValue, int newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) bool QBasicAtomicInt_testAndSetOrdered(volatile int *_q_value, int expectedValue, int newValue) { //R0 = _q_value @@ -176,6 +306,21 @@ bool QBasicAtomicInt_testAndSetOrdered(volatile int *_q_value, int expectedValue } Q_CORE_EXPORT __declspec( naked ) +int QBasicAtomicInt_fetchAndStoreRelaxed(volatile int *_q_value, int newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +int QBasicAtomicInt_fetchAndStoreAcquire(volatile int *_q_value, int newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +int QBasicAtomicInt_fetchAndStoreRelease(volatile int *_q_value, int newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *_q_value, int newValue) { //R0 = _q_value @@ -190,6 +335,21 @@ int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *_q_value, int newValue) } Q_CORE_EXPORT __declspec( naked ) +int QBasicAtomicInt_fetchAndAddRelaxed(volatile int *_q_value, int valueToAdd) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +int QBasicAtomicInt_fetchAndAddAcquire(volatile int *_q_value, int valueToAdd) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +int QBasicAtomicInt_fetchAndAddRelease(volatile int *_q_value, int valueToAdd) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) int QBasicAtomicInt_fetchAndAddOrdered(volatile int *_q_value, int valueToAdd) { //R0 = _q_value @@ -206,6 +366,27 @@ int QBasicAtomicInt_fetchAndAddOrdered(volatile int *_q_value, int valueToAdd) } Q_CORE_EXPORT __declspec( naked ) +bool QBasicAtomicPointer_testAndSetRelaxed(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +bool QBasicAtomicPointer_testAndSetRelease(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +bool QBasicAtomicPointer_testAndSetAcquire(void * volatile *_q_value, + void *expectedValue, + void *newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *_q_value, void *expectedValue, void *newValue) @@ -225,6 +406,21 @@ bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *_q_value, } Q_CORE_EXPORT __declspec( naked ) +void *QBasicAtomicPointer_fetchAndStoreRelaxed(void * volatile *_q_value, void *newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +void *QBasicAtomicPointer_fetchAndStoreAcquire(void * volatile *_q_value, void *newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +void *QBasicAtomicPointer_fetchAndStoreRelease(void * volatile *_q_value, void *newValue) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) void *QBasicAtomicPointer_fetchAndStoreOrdered(void * volatile *_q_value, void *newValue) { //R0 = _q_value @@ -239,6 +435,21 @@ void *QBasicAtomicPointer_fetchAndStoreOrdered(void * volatile *_q_value, void * } Q_CORE_EXPORT __declspec( naked ) +void *QBasicAtomicPointer_fetchAndAddRelaxed(void * volatile *_q_value, qptrdiff valueToAdd) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +void *QBasicAtomicPointer_fetchAndAddRelease(void * volatile *_q_value, qptrdiff valueToAdd) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) +void *QBasicAtomicPointer_fetchAndAddAcquire(void * volatile *_q_value, qptrdiff valueToAdd) +{ + //fall through +} +Q_CORE_EXPORT __declspec( naked ) void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *_q_value, qptrdiff valueToAdd) { //R0 = _q_value @@ -258,3 +469,4 @@ void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *_q_value, qptrdiff #endif QT_END_NAMESPACE #endif +#endif |