Qt 4.8
Public Functions | Static Public Functions | Public Variables | List of all members
QBasicAtomicPointer< T > Class Template Reference

#include <qglobal.h>

Inheritance diagram for QBasicAtomicPointer< T >:
QAtomicPointer< T >

Public Functions

T * fetchAndAddAcquire (qptrdiff valueToAdd)
 
T * fetchAndAddOrdered (qptrdiff valueToAdd)
 
T * fetchAndAddRelaxed (qptrdiff valueToAdd)
 
T * fetchAndAddRelease (qptrdiff valueToAdd)
 
T * fetchAndStoreAcquire (T *newValue)
 
T * fetchAndStoreOrdered (T *newValue)
 
T * fetchAndStoreRelaxed (T *newValue)
 
T * fetchAndStoreRelease (T *newValue)
 
 operator T* () const
 
bool operator! () const
 
bool operator!= (T *value) const
 
T * operator-> () const
 
QBasicAtomicPointer< T > & operator= (T *value)
 
bool operator== (T *value) const
 
bool testAndSetAcquire (T *expectedValue, T *newValue)
 
bool testAndSetOrdered (T *expectedValue, T *newValue)
 
bool testAndSetRelaxed (T *expectedValue, T *newValue)
 
bool testAndSetRelease (T *expectedValue, T *newValue)
 

Static Public Functions

static bool isFetchAndAddNative ()
 
static bool isFetchAndAddWaitFree ()
 
static bool isFetchAndStoreNative ()
 
static bool isFetchAndStoreWaitFree ()
 
static bool isTestAndSetNative ()
 
static bool isTestAndSetWaitFree ()
 

Public Variables

T *volatile _q_value
 

Detailed Description

template<typename T>
class QBasicAtomicPointer< T >

Definition at line 1935 of file qglobal.h.

Functions

◆ fetchAndAddAcquire()

template<typename T >
Q_INLINE_TEMPLATE T * QBasicAtomicPointer< T >::fetchAndAddAcquire ( qptrdiff  valueToAdd)

Definition at line 592 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), connManager(), QBasicAtomicPointer< QBrushData >::isFetchAndAddWaitFree(), QBasicAtomicPointer< QBrushData >::operator=(), and qt_atomic_tasb().

593 {
594  return reinterpret_cast<T *>(q_atomic_fetch_and_add_acquire_ptr(&_q_value, newValue));
595 }
T *volatile _q_value
Definition: qbasicatomic.h:148
void * q_atomic_fetch_and_add_acquire_ptr(volatile void *ptr, qptrdiff valueToAdd)

◆ fetchAndAddOrdered()

template<typename T >
Q_INLINE_TEMPLATE T * QBasicAtomicPointer< T >::fetchAndAddOrdered ( qptrdiff  valueToAdd)

Definition at line 633 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), QBasicAtomicPointer< QBrushData >::operator=(), and qt_atomic_tasb().

634 {
635  return fetchAndAddAcquire(valueToAdd);
636 }
T * fetchAndAddAcquire(qptrdiff valueToAdd)

◆ fetchAndAddRelaxed()

template<typename T >
Q_INLINE_TEMPLATE T * QBasicAtomicPointer< T >::fetchAndAddRelaxed ( qptrdiff  valueToAdd)

Definition at line 587 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), QBasicAtomicPointer< QBrushData >::isFetchAndAddWaitFree(), QBasicAtomicPointer< QBrushData >::operator=(), and qt_atomic_tasb().

588 {
589  return reinterpret_cast<T *>(q_atomic_fetch_and_add_ptr(&_q_value, newValue));
590 }
T *volatile _q_value
Definition: qbasicatomic.h:148
Q_CORE_EXPORT void * q_atomic_fetch_and_add_ptr(volatile void *ptr, int value)

◆ fetchAndAddRelease()

template<typename T >
Q_INLINE_TEMPLATE T * QBasicAtomicPointer< T >::fetchAndAddRelease ( qptrdiff  valueToAdd)

Definition at line 598 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), QBasicAtomicPointer< QBrushData >::isFetchAndAddWaitFree(), QBasicAtomicPointer< QBrushData >::operator=(), and qt_atomic_tasb().

599 {
600  return reinterpret_cast<T *>(q_atomic_fetch_and_add_release_ptr(&_q_value, newValue));
601 }
T *volatile _q_value
Definition: qbasicatomic.h:148
void * q_atomic_fetch_and_add_release_ptr(volatile void *ptr, qptrdiff valueToAdd)

◆ fetchAndStoreAcquire()

template<typename T>
Q_INLINE_TEMPLATE T * QBasicAtomicPointer< T >::fetchAndStoreAcquire ( T *  newValue)

Definition at line 575 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), QBasicAtomicPointer< QBrushData >::isFetchAndAddWaitFree(), QBasicAtomicPointer< QBrushData >::operator=(), qt_atomic_tasb(), and qt_removeObject().

576 {
577  return reinterpret_cast<T *>(q_atomic_fetch_and_store_acquire_ptr(&_q_value, newValue));
578 }
T *volatile _q_value
Definition: qbasicatomic.h:148
int q_atomic_fetch_and_store_acquire_ptr(volatile void *ptr, void *newValue)

◆ fetchAndStoreOrdered()

template<typename T>
Q_INLINE_TEMPLATE T * QBasicAtomicPointer< T >::fetchAndStoreOrdered ( T *  newValue)

Definition at line 627 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), QBasicAtomicPointer< QBrushData >::operator=(), and qt_atomic_tasb().

628 {
629  return fetchAndStoreAcquire(newValue);
630 }
T * fetchAndStoreAcquire(T *newValue)

◆ fetchAndStoreRelaxed()

template<typename T>
Q_INLINE_TEMPLATE T * QBasicAtomicPointer< T >::fetchAndStoreRelaxed ( T *  newValue)

Definition at line 569 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), QBasicAtomicPointer< QBrushData >::isFetchAndAddWaitFree(), QBasicAtomicPointer< QBrushData >::operator=(), and qt_atomic_tasb().

570 {
571  return reinterpret_cast<T *>(q_atomic_set_ptr(&_q_value, newValue));
572 }
T *volatile _q_value
Definition: qbasicatomic.h:148
Q_CORE_EXPORT void * q_atomic_set_ptr(volatile void *ptr, void *newval)

◆ fetchAndStoreRelease()

template<typename T>
Q_INLINE_TEMPLATE T * QBasicAtomicPointer< T >::fetchAndStoreRelease ( T *  newValue)

Definition at line 581 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), connManager(), QBasicAtomicPointer< QBrushData >::isFetchAndAddWaitFree(), QBasicAtomicPointer< QBrushData >::operator=(), and qt_atomic_tasb().

582 {
583  return reinterpret_cast<T *>(q_atomic_fetch_and_store_release_ptr(&_q_value, newValue));
584 }
T *volatile _q_value
Definition: qbasicatomic.h:148
int q_atomic_fetch_and_store_release_ptr(volatile void *ptr, void *newValue)

◆ isFetchAndAddNative()

template<typename T >
Q_INLINE_TEMPLATE bool QBasicAtomicPointer< T >::isFetchAndAddNative ( )
static

Definition at line 98 of file qatomic_alpha.h.

Referenced by QBasicAtomicPointer< QBrushData >::operator=().

99 { return true; }

◆ isFetchAndAddWaitFree()

template<typename T >
Q_INLINE_TEMPLATE bool QBasicAtomicPointer< T >::isFetchAndAddWaitFree ( )
static

Definition at line 101 of file qatomic_alpha.h.

Referenced by QBasicAtomicPointer< QBrushData >::operator=().

102 { return false; }

◆ isFetchAndStoreNative()

template<typename T >
Q_INLINE_TEMPLATE bool QBasicAtomicPointer< T >::isFetchAndStoreNative ( )
static

Definition at line 89 of file qatomic_alpha.h.

Referenced by QBasicAtomicPointer< QBrushData >::operator=().

90 { return true; }

◆ isFetchAndStoreWaitFree()

template<typename T >
Q_INLINE_TEMPLATE bool QBasicAtomicPointer< T >::isFetchAndStoreWaitFree ( )
static

Definition at line 92 of file qatomic_alpha.h.

Referenced by QBasicAtomicPointer< QBrushData >::operator=().

93 { return false; }

◆ isTestAndSetNative()

template<typename T >
Q_INLINE_TEMPLATE bool QBasicAtomicPointer< T >::isTestAndSetNative ( )
static

Definition at line 80 of file qatomic_alpha.h.

Referenced by QBasicAtomicPointer< QBrushData >::operator=().

81 { return true; }

◆ isTestAndSetWaitFree()

template<typename T >
Q_INLINE_TEMPLATE bool QBasicAtomicPointer< T >::isTestAndSetWaitFree ( )
static

Definition at line 83 of file qatomic_alpha.h.

Referenced by QBasicAtomicPointer< QBrushData >::operator=().

84 { return false; }

◆ operator T*()

template<typename T>
QBasicAtomicPointer< T >::operator T* ( ) const
inline

Definition at line 167 of file qbasicatomic.h.

168  {
169  return _q_value;
170  }
T *volatile _q_value
Definition: qbasicatomic.h:148

◆ operator!()

template<typename T>
bool QBasicAtomicPointer< T >::operator! ( ) const
inline

Definition at line 162 of file qbasicatomic.h.

163  {
164  return operator==(0);
165  }
bool operator==(T *value) const
Definition: qbasicatomic.h:152

◆ operator!=()

template<typename T>
bool QBasicAtomicPointer< T >::operator!= ( T *  value) const
inline

Definition at line 157 of file qbasicatomic.h.

158  {
159  return !operator==(value);
160  }
bool operator==(T *value) const
Definition: qbasicatomic.h:152

◆ operator->()

template<typename T>
T* QBasicAtomicPointer< T >::operator-> ( ) const
inline

Definition at line 172 of file qbasicatomic.h.

173  {
174  return _q_value;
175  }
T *volatile _q_value
Definition: qbasicatomic.h:148

◆ operator=()

template<typename T>
QBasicAtomicPointer<T>& QBasicAtomicPointer< T >::operator= ( T *  value)
inline

Definition at line 177 of file qbasicatomic.h.

178  {
179 #ifdef QT_ARCH_PARISC
180  this->_q_lock[0] = this->_q_lock[1] = this->_q_lock[2] = this->_q_lock[3] = -1;
181 #endif
182  _q_value = value;
183  return *this;
184  }
T *volatile _q_value
Definition: qbasicatomic.h:148

◆ operator==()

template<typename T>
bool QBasicAtomicPointer< T >::operator== ( T *  value) const
inline

Definition at line 152 of file qbasicatomic.h.

Referenced by QBasicAtomicPointer< QBrushData >::operator!(), and QBasicAtomicPointer< QBrushData >::operator!=().

153  {
154  return _q_value == value;
155  }
T *volatile _q_value
Definition: qbasicatomic.h:148

◆ testAndSetAcquire()

template<typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer< T >::testAndSetAcquire ( T *  expectedValue,
T *  newValue 
)

Definition at line 557 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), QBasicAtomicPointer< QBrushData >::isFetchAndAddWaitFree(), QBasicAtomicPointer< QBrushData >::operator=(), and qt_atomic_tasb().

558 {
559  return q_atomic_test_and_set_acquire_ptr(&_q_value, expectedValue, newValue) != 0;
560 }
T *volatile _q_value
Definition: qbasicatomic.h:148
Q_CORE_EXPORT int q_atomic_test_and_set_acquire_ptr(volatile void *ptr, void *expected, void *newval)

◆ testAndSetOrdered()

template<typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer< T >::testAndSetOrdered ( T *  expectedValue,
T *  newValue 
)

Definition at line 621 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), QBasicAtomicPointer< QBrushData >::operator=(), qt_atomic_tasb(), queued_activate(), and signalSlotLock().

622 {
623  return testAndSetAcquire(expectedValue, newValue);
624 }
bool testAndSetAcquire(T *expectedValue, T *newValue)

◆ testAndSetRelaxed()

template<typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer< T >::testAndSetRelaxed ( T *  expectedValue,
T *  newValue 
)

Definition at line 551 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), QBasicAtomicPointer< QBrushData >::isFetchAndAddWaitFree(), QBasicAtomicPointer< QBrushData >::operator=(), and qt_atomic_tasb().

552 {
553  return q_atomic_test_and_set_ptr(&_q_value, expectedValue, newValue) != 0;
554 }
T *volatile _q_value
Definition: qbasicatomic.h:148
Q_CORE_EXPORT int q_atomic_test_and_set_ptr(volatile void *ptr, void *expected, void *newval)

◆ testAndSetRelease()

template<typename T>
Q_INLINE_TEMPLATE bool QBasicAtomicPointer< T >::testAndSetRelease ( T *  expectedValue,
T *  newValue 
)

Definition at line 563 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), QBasicAtomicPointer< QBrushData >::isFetchAndAddWaitFree(), QBasicAtomicPointer< QBrushData >::operator=(), and qt_atomic_tasb().

564 {
565  return q_atomic_test_and_set_release_ptr(&_q_value, expectedValue, newValue) != 0;
566 }
T *volatile _q_value
Definition: qbasicatomic.h:148
Q_CORE_EXPORT int q_atomic_test_and_set_release_ptr(volatile void *ptr, void *expected, void *newval)

Properties

◆ _q_value

template<typename T>
T* volatile QBasicAtomicPointer< T >::_q_value

The documentation for this class was generated from the following files: