diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-03-20 23:30:31 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-20 23:30:31 +0100 |
commit | e5a11fbb3251a98fafd6bebf0b6fc366acb19088 (patch) | |
tree | 8e1bd6704205307e0a23484221ea1bb67a9f411e /src/corelib/arch/qatomic_ia64.h | |
parent | 0646d1131b4bc65cdd9af29f4ce00fdd2398a3df (diff) | |
parent | 76c0be34cd4ff4564693162fa7528463e23ce9d8 (diff) |
Merge "Merge branch 'dev' into stable" into refs/staging/stable
Diffstat (limited to 'src/corelib/arch/qatomic_ia64.h')
-rw-r--r-- | src/corelib/arch/qatomic_ia64.h | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/src/corelib/arch/qatomic_ia64.h b/src/corelib/arch/qatomic_ia64.h index 1a5259aa09..ed72036076 100644 --- a/src/corelib/arch/qatomic_ia64.h +++ b/src/corelib/arch/qatomic_ia64.h @@ -45,15 +45,12 @@ #include <QtCore/qgenericatomic.h> -QT_BEGIN_HEADER - QT_BEGIN_NAMESPACE #if 0 // silence syncqt warnings QT_END_NAMESPACE -QT_END_HEADER - +#pragma qt_sync_skip_header_check #pragma qt_sync_stop_processing #endif @@ -222,28 +219,28 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue) inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) { register int expectedValueCopy = expectedValue; - return (static_cast<int>(_InterlockedCompareExchange(&_q_value, - newValue, - expectedValueCopy)) - == expectedValue); + return (static_cast<int>(_InterlockedCompareExchange(&_q_value, + newValue, + expectedValueCopy)) + == expectedValue); } inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue) { register int expectedValueCopy = expectedValue; - return (static_cast<int>(_InterlockedCompareExchange_acq(reinterpret_cast<volatile uint *>(&_q_value), - newValue, - expectedValueCopy)) - == expectedValue); + return (static_cast<int>(_InterlockedCompareExchange_acq(reinterpret_cast<volatile uint *>(&_q_value), + newValue, + expectedValueCopy)) + == expectedValue); } inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue) { register int expectedValueCopy = expectedValue; - return (static_cast<int>(_InterlockedCompareExchange_rel(reinterpret_cast<volatile uint *>(&_q_value), - newValue, - expectedValueCopy)) - == expectedValue); + return (static_cast<int>(_InterlockedCompareExchange_rel(reinterpret_cast<volatile uint *>(&_q_value), + newValue, + expectedValueCopy)) + == expectedValue); } inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd) @@ -289,10 +286,10 @@ template <typename T> Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue) { register T *expectedValueCopy = expectedValue; - return (_InterlockedCompareExchangePointer(reinterpret_cast<void * volatile*>(&_q_value), - newValue, - expectedValueCopy) - == expectedValue); + return (_InterlockedCompareExchangePointer(reinterpret_cast<void * volatile*>(&_q_value), + newValue, + expectedValueCopy) + == expectedValue); } template <typename T> @@ -304,7 +301,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu }; x = &_q_value; register T *expectedValueCopy = expectedValue; - return (_InterlockedCompareExchange64_acq(p, quintptr(newValue), quintptr(expectedValueCopy)) + return (_InterlockedCompareExchange64_acq(p, quintptr(newValue), quintptr(expectedValueCopy)) == quintptr(expectedValue)); } @@ -1089,6 +1086,4 @@ T QBasicAtomicOps<size>::fetchAndAddOrdered(T &_q_value, typename QAtomicAdditiv QT_END_NAMESPACE -QT_END_HEADER - #endif // QATOMIC_IA64_H |