From 6bf4e448fee554153eab09c755ba6fdca012bd52 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 6 Aug 2012 17:48:42 +0200 Subject: Mark all atomic functions as Q_DECL_NOTHROW Actually, only the "new" atomics are marked. The old implementation, based on qoldbasicatomic.h is unchanged, but should still work without a problem. The following configurations were tested and do work: - x86 64-bit - x86 32-bit - generic GCC - generic C++11 std::atomic - bootstrap - ARMv6 and 7 - MIPS - MSVC 2010 32-bit - MSVC 2010 64-bit The only two configurations untested are IA-64 and ARMv5. Except for MSVC, all configurations were tested with GCC 4.6 (MIPS and ARM) and 4.7 (x86 and generics). Change-Id: Iecbfeacd9d20b535453e91335165e9a221e0b47e Reviewed-by: Marc Mutz Reviewed-by: Lars Knoll --- src/corelib/arch/qatomic_bootstrap.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/corelib/arch/qatomic_bootstrap.h') diff --git a/src/corelib/arch/qatomic_bootstrap.h b/src/corelib/arch/qatomic_bootstrap.h index 75f328b7c7..da6c09b6b3 100644 --- a/src/corelib/arch/qatomic_bootstrap.h +++ b/src/corelib/arch/qatomic_bootstrap.h @@ -62,16 +62,16 @@ template struct QAtomicOps: QGenericAtomicOps > { typedef T Type; - static bool ref(T &_q_value) + static bool ref(T &_q_value) Q_DECL_NOTHROW { return ++_q_value != 0; } - static bool deref(T &_q_value) + static bool deref(T &_q_value) Q_DECL_NOTHROW { return --_q_value != 0; } - static bool testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) + static bool testAndSetRelaxed(T &_q_value, T expectedValue, T newValue) Q_DECL_NOTHROW { if (_q_value == expectedValue) { _q_value = newValue; @@ -80,7 +80,7 @@ template struct QAtomicOps: QGenericAtomicOps > return false; } - static T fetchAndStoreRelaxed(T &_q_value, T newValue) + static T fetchAndStoreRelaxed(T &_q_value, T newValue) Q_DECL_NOTHROW { T tmp = _q_value; _q_value = newValue; @@ -88,7 +88,7 @@ template struct QAtomicOps: QGenericAtomicOps > } static - T fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType::AdditiveT valueToAdd) + T fetchAndAddRelaxed(T &_q_value, typename QAtomicAdditiveType::AdditiveT valueToAdd) Q_DECL_NOTHROW { T returnValue = _q_value; _q_value += valueToAdd; -- cgit v1.2.3