Fix compilation on armv5
Two changes broke compilation on armv5, where we're currently not CI-testing:634f82f1f1
changed the signature in a function definition without changing its declaration, while it was actually intending to add this as a new overload.bfe0db6fbe
added an #error condition without fixing compilation on armv5. I don't know if the fix is correct, but at least it compiles. Task-number: QTBUG-37034 Change-Id: If99142fafb9bd55afc20b17f8b3cce5ee0ffec13 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
f12b0f9a38
commit
6813a21c52
@ -54,6 +54,7 @@ QT_END_NAMESPACE
|
|||||||
#pragma qt_sync_stop_processing
|
#pragma qt_sync_stop_processing
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define Q_ATOMIC_INT32_IS_SUPPORTED
|
||||||
#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_NOT_NATIVE
|
#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_NOT_NATIVE
|
||||||
#define Q_ATOMIC_INT_TEST_AND_SET_IS_NOT_NATIVE
|
#define Q_ATOMIC_INT_TEST_AND_SET_IS_NOT_NATIVE
|
||||||
#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_ALWAYS_NATIVE
|
#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_ALWAYS_NATIVE
|
||||||
@ -98,6 +99,7 @@ template <int size> struct QBasicAtomicOps: QGenericAtomicOps<QBasicAtomicOps<si
|
|||||||
static Q_DECL_CONSTEXPR bool isTestAndSetNative() Q_DECL_NOTHROW { return false; }
|
static Q_DECL_CONSTEXPR bool isTestAndSetNative() Q_DECL_NOTHROW { return false; }
|
||||||
static Q_DECL_CONSTEXPR bool isTestAndSetWaitFree() Q_DECL_NOTHROW { return false; }
|
static Q_DECL_CONSTEXPR bool isTestAndSetWaitFree() Q_DECL_NOTHROW { return false; }
|
||||||
template <typename T> static bool testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW;
|
template <typename T> static bool testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW;
|
||||||
|
template <typename T> static bool testAndSetRelaxed(T &_q_value, T expectedValue, T newValue, T *currentValue) Q_DECL_NOTHROW;
|
||||||
template <typename T> static T fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW;
|
template <typename T> static T fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW;
|
||||||
template <typename T> static
|
template <typename T> static
|
||||||
T fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW;
|
T fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType<T>::AdditiveT valueToAdd) Q_DECL_NOTHROW;
|
||||||
@ -132,6 +134,18 @@ bool QBasicAtomicOps<4>::deref(T &_q_value) Q_DECL_NOTHROW
|
|||||||
return newValue != 0;
|
return newValue != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<> template <typename T> inline
|
||||||
|
bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW
|
||||||
|
{
|
||||||
|
T originalValue;
|
||||||
|
do {
|
||||||
|
originalValue = _q_value;
|
||||||
|
if (originalValue != expectedValue)
|
||||||
|
return false;
|
||||||
|
} while (_q_cmpxchg(expectedValue, newValue, &_q_value) != 0);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
template<> template <typename T> inline
|
template<> template <typename T> inline
|
||||||
bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue, T *currentValue) Q_DECL_NOTHROW
|
bool QBasicAtomicOps<4>::testAndSetRelaxed(T &_q_value, T expectedValue, T newValue, T *currentValue) Q_DECL_NOTHROW
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user