diff options
author | Thiago Macieira <thiago@kde.org> | 2011-07-05 23:52:29 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-20 10:05:49 +0200 |
commit | c7f8213bc59691f35f44a42fa5df602e742673c4 (patch) | |
tree | 5fefb18ddb9c00077a7f2c87c2892295913069c0 /src/corelib/thread/qbasicatomic.h | |
parent | e4b145d11cf3927a8ada445b6fef95fe29ac9946 (diff) |
Move the non-atomic and implicit functions from QBasicAtomicXXX
Now, users of QBasicAtomicInt and QBasicAtomicPointer must be sure to
use .load() and .store() to access the values.
Change-Id: I6b48ed175618baf387dd38d821bd50e6e93c082e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/corelib/thread/qbasicatomic.h')
-rw-r--r-- | src/corelib/thread/qbasicatomic.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h index 6519d4e401..d3e988d8c5 100644 --- a/src/corelib/thread/qbasicatomic.h +++ b/src/corelib/thread/qbasicatomic.h @@ -64,36 +64,6 @@ public: volatile int _q_value; #endif - // Non-atomic API - inline bool operator==(int value) const - { - return _q_value == value; - } - - inline bool operator!=(int value) const - { - return _q_value != value; - } - - inline bool operator!() const - { - return _q_value == 0; - } - - inline operator int() const - { - return _q_value; - } - - inline QBasicAtomicInt &operator=(int value) - { -#ifdef QT_ARCH_PARISC - this->_q_lock[0] = this->_q_lock[1] = this->_q_lock[2] = this->_q_lock[3] = -1; -#endif - _q_value = value; - return *this; - } - // Atomic API, implemented in qatomic_XXX.h int load() const { return _q_value; } @@ -153,41 +123,6 @@ public: T * volatile _q_value; #endif - // Non-atomic API - inline bool operator==(T *value) const - { - return _q_value == value; - } - - inline bool operator!=(T *value) const - { - return !operator==(value); - } - - inline bool operator!() const - { - return operator==(0); - } - - inline operator T *() const - { - return _q_value; - } - - inline T *operator->() const - { - return _q_value; - } - - inline QBasicAtomicPointer<T> &operator=(T *value) - { -#ifdef QT_ARCH_PARISC - this->_q_lock[0] = this->_q_lock[1] = this->_q_lock[2] = this->_q_lock[3] = -1; -#endif - _q_value = value; - return *this; - } - // Atomic API, implemented in qatomic_XXX.h T *load() const { return _q_value; } |