Public Member Functions | Static Public Member Functions | Public Attributes

QBasicAtomicInt Class Reference

Search for all occurrences

Detailed Description

Definition at line 53 of file qbasicatomic.h.

#include <qbasicatomic.h>

Inheritance diagram for QBasicAtomicInt:
Inheritance graph
[legend]

List of all members.

Public Member Functions

bool  operator== (int value) const
bool  operator!= (int value) const
bool  operator! () const
  operator int () const
QBasicAtomicInt operator= (int value)
bool  ref ()
bool  deref ()
bool  testAndSetRelaxed (int expectedValue, int newValue)
bool  testAndSetAcquire (int expectedValue, int newValue)
bool  testAndSetRelease (int expectedValue, int newValue)
bool  testAndSetOrdered (int expectedValue, int newValue)
int  fetchAndStoreRelaxed (int newValue)
int  fetchAndStoreAcquire (int newValue)
int  fetchAndStoreRelease (int newValue)
int  fetchAndStoreOrdered (int newValue)
int  fetchAndAddRelaxed (int valueToAdd)
int  fetchAndAddAcquire (int valueToAdd)
int  fetchAndAddRelease (int valueToAdd)
int  fetchAndAddOrdered (int valueToAdd)

Static Public Member Functions

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

Public Attributes

volatile int  _q_value

Member Function Documentation

bool operator== ( int  value ) const [inline]

Definition at line 68 of file qbasicatomic.h.

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

Definition at line 73 of file qbasicatomic.h.

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

Definition at line 78 of file qbasicatomic.h.

    {
        return _q_value == 0;
    }
operator int ( ) const [inline]

Definition at line 83 of file qbasicatomic.h.

    {
        return _q_value;
    }
QBasicAtomicInt& operator= ( int  value ) [inline]

Reimplemented in QAtomicInt.

Definition at line 88 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;
    }
bool isReferenceCountingNative ( ) [inline, static]

Definition at line 51 of file qatomic_alpha.h.

{ return true; }
bool isReferenceCountingWaitFree ( ) [inline, static]

Definition at line 53 of file qatomic_alpha.h.

{ return false; }
bool ref ( ) [inline]

Definition at line 495 of file qatomic_alpha.h.

{
    return q_atomic_increment(&_q_value) != 0;
}
bool deref ( ) [inline]

Definition at line 500 of file qatomic_alpha.h.

{
    return q_atomic_decrement(&_q_value) != 0;
}
bool isTestAndSetNative ( ) [inline, static]

Definition at line 58 of file qatomic_alpha.h.

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

Definition at line 60 of file qatomic_alpha.h.

{ return false; }
bool testAndSetRelaxed ( int  expectedValue,
int  newValue 
) [inline]

Definition at line 505 of file qatomic_alpha.h.

{
    return q_atomic_test_and_set_int(&_q_value, expectedValue, newValue) != 0;
}
bool testAndSetAcquire ( int  expectedValue,
int  newValue 
) [inline]

Definition at line 510 of file qatomic_alpha.h.

{
    return q_atomic_test_and_set_acquire_int(&_q_value, expectedValue, newValue) != 0;
}
bool testAndSetRelease ( int  expectedValue,
int  newValue 
) [inline]

Definition at line 515 of file qatomic_alpha.h.

{
    return q_atomic_test_and_set_release_int(&_q_value, expectedValue, newValue) != 0;
}
bool testAndSetOrdered ( int  expectedValue,
int  newValue 
) [inline]

Definition at line 605 of file qatomic_alpha.h.

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

Definition at line 65 of file qatomic_alpha.h.

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

Definition at line 67 of file qatomic_alpha.h.

{ return false; }
int fetchAndStoreRelaxed ( int  newValue ) [inline]

Definition at line 520 of file qatomic_alpha.h.

{
    return q_atomic_set_int(&_q_value, newValue);
}
int fetchAndStoreAcquire ( int  newValue ) [inline]
int fetchAndStoreRelease ( int  newValue ) [inline]
int fetchAndStoreOrdered ( int  newValue ) [inline]

Definition at line 610 of file qatomic_alpha.h.

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

Definition at line 72 of file qatomic_alpha.h.

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

Definition at line 74 of file qatomic_alpha.h.

{ return false; }
int fetchAndAddRelaxed ( int  valueToAdd ) [inline]

Definition at line 535 of file qatomic_alpha.h.

{
    return q_atomic_fetch_and_add_int(&_q_value, valueToAdd);
}
int fetchAndAddAcquire ( int  valueToAdd ) [inline]

Definition at line 540 of file qatomic_alpha.h.

{
    return q_atomic_fetch_and_add_acquire_int(&_q_value, valueToAdd);
}
int fetchAndAddRelease ( int  valueToAdd ) [inline]

Definition at line 545 of file qatomic_alpha.h.

{
    return q_atomic_fetch_and_add_release_int(&_q_value, valueToAdd);
}
int fetchAndAddOrdered ( int  valueToAdd ) [inline]

Definition at line 615 of file qatomic_alpha.h.

{
    return fetchAndAddAcquire(valueToAdd);
}

Member Data Documentation

volatile int _q_value

Definition at line 64 of file qbasicatomic.h.


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

QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt
QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt QBasicAtomicInt