summaryrefslogtreecommitdiffstats
path: root/src/corelib/arch/qatomic_unix.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-08-06 17:48:42 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-09 03:26:24 +0200
commit6bf4e448fee554153eab09c755ba6fdca012bd52 (patch)
tree0efb1e49ef18b1e80d3bf8bb6569d4a284674a3c /src/corelib/arch/qatomic_unix.cpp
parent2d9c2c0562aa895b46a7c01902660aa51981e989 (diff)
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 <marc.mutz@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/arch/qatomic_unix.cpp')
-rw-r--r--src/corelib/arch/qatomic_unix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/arch/qatomic_unix.cpp b/src/corelib/arch/qatomic_unix.cpp
index a709be3fa1..cc929bfa34 100644
--- a/src/corelib/arch/qatomic_unix.cpp
+++ b/src/corelib/arch/qatomic_unix.cpp
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
static pthread_mutex_t qAtomicMutex = PTHREAD_MUTEX_INITIALIZER;
Q_CORE_EXPORT
-bool QAtomicOps<int>::testAndSetRelaxed(int &_q_value, int expectedValue, int newValue)
+bool QAtomicOps<int>::testAndSetRelaxed(int &_q_value, int expectedValue, int newValue) Q_DECL_NOTHROW
{
bool returnValue = false;
pthread_mutex_lock(&qAtomicMutex);
@@ -65,7 +65,7 @@ bool QAtomicOps<int>::testAndSetRelaxed(int &_q_value, int expectedValue, int ne
}
Q_CORE_EXPORT
-bool QAtomicOps<void *>::testAndSetRelaxed(void *&_q_value, void *expectedValue, void *newValue)
+bool QAtomicOps<void *>::testAndSetRelaxed(void *&_q_value, void *expectedValue, void *newValue) Q_DECL_NOTHROW
{
bool returnValue = false;
pthread_mutex_lock(&qAtomicMutex);