Public Member Functions | Static Public Member Functions | Public Attributes

QBasicAtomicPointer< T > Class Template Reference

Search for all occurrences

Detailed Description

template<typename T>
class QBasicAtomicPointer< T >

Definition at line 131 of file qbasicatomic.h.

#include <qbasicatomic.h>

Inheritance diagram for QBasicAtomicPointer< T >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

T *volatile  _q_value

Member Function Documentation

bool operator== ( T *  value ) const [inline]

Definition at line 152 of file qbasicatomic.h.

    {
        return _q_value == value;
    }
bool operator!= ( T *  value ) const [inline]

Definition at line 157 of file qbasicatomic.h.

    {
        return !operator==(value);
    }
bool operator! ( void  ) const [inline]

Definition at line 162 of file qbasicatomic.h.

    {
        return operator==(0);
    }
operator T * ( ) const [inline]

Definition at line 167 of file qbasicatomic.h.

    {
        return _q_value;
    }
T* operator-> ( void  ) const [inline]

Definition at line 172 of file qbasicatomic.h.

    {
        return _q_value;
    }
QBasicAtomicPointer<T>& operator= ( T *  value ) [inline]

Reimplemented in QAtomicPointer< T >.

Definition at line 177 of file qbasicatomic.h.

    {
#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;
    }
Q_INLINE_TEMPLATE bool isTestAndSetNative ( ) [static]

Definition at line 80 of file qatomic_alpha.h.

{ return true; }
Q_INLINE_TEMPLATE bool isTestAndSetWaitFree ( ) [static]

Definition at line 83 of file qatomic_alpha.h.

{ return false; }
Q_INLINE_TEMPLATE bool testAndSetRelaxed ( T *  expectedValue,
T *  newValue 
)

Definition at line 551 of file qatomic_alpha.h.

{
    return q_atomic_test_and_set_ptr(&_q_value, expectedValue, newValue) != 0;
}
Q_INLINE_TEMPLATE bool testAndSetAcquire ( T *  expectedValue,
T *  newValue 
)

Definition at line 557 of file qatomic_alpha.h.

{
    return q_atomic_test_and_set_acquire_ptr(&_q_value, expectedValue, newValue) != 0;
}
Q_INLINE_TEMPLATE bool testAndSetRelease ( T *  expectedValue,
T *  newValue 
)

Definition at line 563 of file qatomic_alpha.h.

{
    return q_atomic_test_and_set_release_ptr(&_q_value, expectedValue, newValue) != 0;
}
Q_INLINE_TEMPLATE bool testAndSetOrdered ( T *  expectedValue,
T *  newValue 
)

Definition at line 621 of file qatomic_alpha.h.

{
    return testAndSetAcquire(expectedValue, newValue);
}
Q_INLINE_TEMPLATE bool isFetchAndStoreNative ( ) [static]

Definition at line 89 of file qatomic_alpha.h.

{ return true; }
Q_INLINE_TEMPLATE bool isFetchAndStoreWaitFree ( ) [static]

Definition at line 92 of file qatomic_alpha.h.

{ return false; }
Q_INLINE_TEMPLATE T * fetchAndStoreRelaxed ( T *  newValue )

Definition at line 569 of file qatomic_alpha.h.

{
    return reinterpret_cast<T *>(q_atomic_set_ptr(&_q_value, newValue));
}
Q_INLINE_TEMPLATE T * fetchAndStoreAcquire ( T *  newValue )

Definition at line 575 of file qatomic_alpha.h.

{
    return reinterpret_cast<T *>(q_atomic_fetch_and_store_acquire_ptr(&_q_value, newValue));
}
Q_INLINE_TEMPLATE T * fetchAndStoreRelease ( T *  newValue )

Definition at line 581 of file qatomic_alpha.h.

{
    return reinterpret_cast<T *>(q_atomic_fetch_and_store_release_ptr(&_q_value, newValue));
}
Q_INLINE_TEMPLATE T * fetchAndStoreOrdered ( T *  newValue )

Definition at line 627 of file qatomic_alpha.h.

{
    return fetchAndStoreAcquire(newValue);
}
Q_INLINE_TEMPLATE bool isFetchAndAddNative ( ) [static]

Definition at line 98 of file qatomic_alpha.h.

{ return true; }
Q_INLINE_TEMPLATE bool isFetchAndAddWaitFree ( ) [static]

Definition at line 101 of file qatomic_alpha.h.

{ return false; }
Q_INLINE_TEMPLATE T * fetchAndAddRelaxed ( qptrdiff  valueToAdd )

Definition at line 587 of file qatomic_alpha.h.

{
    return reinterpret_cast<T *>(q_atomic_fetch_and_add_ptr(&_q_value, newValue));
}
Q_INLINE_TEMPLATE T * fetchAndAddAcquire ( qptrdiff  valueToAdd )

Definition at line 592 of file qatomic_alpha.h.

{
    return reinterpret_cast<T *>(q_atomic_fetch_and_add_acquire_ptr(&_q_value, newValue));
}
Q_INLINE_TEMPLATE T * fetchAndAddRelease ( qptrdiff  valueToAdd )

Definition at line 598 of file qatomic_alpha.h.

{
    return reinterpret_cast<T *>(q_atomic_fetch_and_add_release_ptr(&_q_value, newValue));
}
Q_INLINE_TEMPLATE T * fetchAndAddOrdered ( qptrdiff  valueToAdd )

Definition at line 633 of file qatomic_alpha.h.

{
    return fetchAndAddAcquire(valueToAdd);
}

Member Data Documentation

T* volatile _q_value

Definition at line 148 of file qbasicatomic.h.


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