From 817bec7a23cb8ee20947547eefa3b4cca70525c9 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 11 Dec 2012 12:06:31 -0800 Subject: [PATCH] Doc: Remove the mention of non-atomic convenience operators in QAtomic For two reasons: 1) those operators are gone and 2) the ones that remain are atomic. Task-number: QTBUG-28532 Task-number: QTBUG-24627 Change-Id: I1e9d1b076d923546c1ee3d45f312066590f97416 Reviewed-by: Olivier Goffart --- dist/changes-5.0.0 | 6 ++++++ src/corelib/thread/qatomic.cpp | 12 ------------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0 index 3749f18d64..a969fc84d5 100644 --- a/dist/changes-5.0.0 +++ b/dist/changes-5.0.0 @@ -11,6 +11,12 @@ information about a particular change. * Source incompatible changes * **************************************************************************** +- QAtomicInt's and QAtomicPointer's non-atomic convenience methods + (i.e., operator=, operator int / operator T*, operator!, operator==, + operator!= and operator->) have been removed as they did implicit + loads and stores of unspecified memory ordering. Code dealing with + is expected to use load(), loadAquire(), store() and storeRelease() + as necessary instead. - QObject * The signatures of the connectNotify() and disconnectNotify() functions diff --git a/src/corelib/thread/qatomic.cpp b/src/corelib/thread/qatomic.cpp index 87f1d84d4d..791f41074d 100644 --- a/src/corelib/thread/qatomic.cpp +++ b/src/corelib/thread/qatomic.cpp @@ -53,12 +53,6 @@ The QAtomicInt class provides atomic reference counting, test-and-set, fetch-and-store, and fetch-and-add for integers. - \section1 Non-atomic convenience operators - - For convenience, QAtomicInt provides integer comparison, cast, and - assignment operators. Note that a combination of these operators - is \e not an atomic operation. - \section1 The Atomic API \section2 Reference counting @@ -610,12 +604,6 @@ An \e atomic operation is a complex operation that completes without interruption. The QAtomicPointer class provides atomic test-and-set, fetch-and-store, and fetch-and-add for pointers. - \section1 Non-atomic convenience operators - - For convenience, QAtomicPointer provides pointer comparison, cast, - dereference, and assignment operators. Note that these operators - are \e not atomic. - \section1 The Atomic API \section2 Memory ordering