summaryrefslogtreecommitdiffstats
path: root/src/corelib/arch/qatomic_powerpc.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/arch/qatomic_powerpc.h')
-rw-r--r--src/corelib/arch/qatomic_powerpc.h134
1 files changed, 1 insertions, 133 deletions
diff --git a/src/corelib/arch/qatomic_powerpc.h b/src/corelib/arch/qatomic_powerpc.h
index 949102748a..f03539dcd5 100644
--- a/src/corelib/arch/qatomic_powerpc.h
+++ b/src/corelib/arch/qatomic_powerpc.h
@@ -473,139 +473,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueTo
#undef _Q_VALUE_REGISTER_OPERAND
#else
-
-extern "C" {
- int q_atomic_test_and_set_int(volatile int *ptr, int expectedValue, int newValue);
- int q_atomic_test_and_set_acquire_int(volatile int *ptr, int expectedValue, int newValue);
- int q_atomic_test_and_set_release_int(volatile int *ptr, int expectedValue, int newValue);
- int q_atomic_test_and_set_ptr(volatile void *ptr, void *expectedValue, void *newValue);
- int q_atomic_test_and_set_acquire_ptr(volatile void *ptr, void *expectedValue, void *newValue);
- int q_atomic_test_and_set_release_ptr(volatile void *ptr, void *expectedValue, void *newValue);
- int q_atomic_increment(volatile int *);
- int q_atomic_decrement(volatile int *);
- int q_atomic_set_int(volatile int *, int);
- int q_atomic_fetch_and_store_acquire_int(volatile int *ptr, int newValue);
- int q_atomic_fetch_and_store_release_int(volatile int *ptr, int newValue);
- void *q_atomic_set_ptr(volatile void *, void *);
- int q_atomic_fetch_and_store_acquire_ptr(volatile void *ptr, void *newValue);
- int q_atomic_fetch_and_store_release_ptr(volatile void *ptr, void *newValue);
- int q_atomic_fetch_and_add_int(volatile int *ptr, int valueToAdd);
- int q_atomic_fetch_and_add_acquire_int(volatile int *ptr, int valueToAdd);
- int q_atomic_fetch_and_add_release_int(volatile int *ptr, int valueToAdd);
- void *q_atomic_fetch_and_add_ptr(volatile void *ptr, qptrdiff valueToAdd);
- void *q_atomic_fetch_and_add_acquire_ptr(volatile void *ptr, qptrdiff valueToAdd);
- void *q_atomic_fetch_and_add_release_ptr(volatile void *ptr, qptrdiff valueToAdd);
-} // extern "C"
-
-
-inline bool QBasicAtomicInt::ref()
-{
- return q_atomic_increment(&_q_value) != 0;
-}
-
-inline bool QBasicAtomicInt::deref()
-{
- return q_atomic_decrement(&_q_value) != 0;
-}
-
-inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
-{
- return q_atomic_test_and_set_int(&_q_value, expectedValue, newValue) != 0;
-}
-
-inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
-{
- return q_atomic_test_and_set_acquire_int(&_q_value, expectedValue, newValue) != 0;
-}
-
-inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
-{
- return q_atomic_test_and_set_release_int(&_q_value, expectedValue, newValue) != 0;
-}
-
-inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
-{
- return q_atomic_set_int(&_q_value, newValue);
-}
-
-inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
-{
- return q_atomic_fetch_and_store_acquire_int(&_q_value, newValue);
-}
-
-inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
-{
- return q_atomic_fetch_and_store_release_int(&_q_value, newValue);
-}
-
-inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
-{
- return q_atomic_fetch_and_add_int(&_q_value, valueToAdd);
-}
-
-inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
-{
- return q_atomic_fetch_and_add_acquire_int(&_q_value, valueToAdd);
-}
-
-inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
-{
- return q_atomic_fetch_and_add_release_int(&_q_value, valueToAdd);
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
-{
- return q_atomic_test_and_set_ptr(&_q_value, expectedValue, newValue) != 0;
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
-{
- return q_atomic_test_and_set_acquire_ptr(&_q_value, expectedValue, newValue) != 0;
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
-{
- return q_atomic_test_and_set_release_ptr(&_q_value, expectedValue, newValue) != 0;
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
-{
- return reinterpret_cast<T *>(q_atomic_set_ptr(&_q_value, newValue));
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
-{
- return reinterpret_cast<T *>(q_atomic_fetch_and_store_acquire_ptr(&_q_value, newValue));
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
-{
- return reinterpret_cast<T *>(q_atomic_fetch_and_store_release_ptr(&_q_value, newValue));
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
-{
- return reinterpret_cast<T *>(q_atomic_fetch_and_add_ptr(&_q_value, valueToAdd * sizeof(T)));
-}
-template <typename T>
-Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
-{
- return reinterpret_cast<T *>(q_atomic_fetch_and_add_acquire_ptr(&_q_value, valueToAdd * sizeof(T)));
-}
-
-template <typename T>
-Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
-{
- return reinterpret_cast<T *>(q_atomic_fetch_and_add_release_ptr(&_q_value, valueToAdd * sizeof(T)));
-}
-
+# error "This compiler for PowerPC is not supported"
#endif
inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue)