Qt 4.8
Public Functions | Static Public Functions | Public Variables | List of all members
QBasicAtomicInt Class Reference

#include <qbasicatomic.h>

Inheritance diagram for QBasicAtomicInt:
QAtomicInt

Public Functions

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

Static Public Functions

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

Public Variables

volatile int _q_value
 

Detailed Description

Definition at line 53 of file qbasicatomic.h.

Functions

◆ deref()

bool QBasicAtomicInt::deref ( )
inline

◆ fetchAndAddAcquire()

int QBasicAtomicInt::fetchAndAddAcquire ( int  valueToAdd)
inline

Definition at line 540 of file qatomic_alpha.h.

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

541 {
542  return q_atomic_fetch_and_add_acquire_int(&_q_value, valueToAdd);
543 }
volatile int _q_value
Definition: qbasicatomic.h:64
Q_CORE_EXPORT int q_atomic_fetch_and_add_acquire_int(volatile int *ptr, int value)

◆ fetchAndAddOrdered()

int QBasicAtomicInt::fetchAndAddOrdered ( int  valueToAdd)
inline

Definition at line 615 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), and qt_atomic_tasb().

616 {
617  return fetchAndAddAcquire(valueToAdd);
618 }
int fetchAndAddAcquire(int valueToAdd)

◆ fetchAndAddRelaxed()

int QBasicAtomicInt::fetchAndAddRelaxed ( int  valueToAdd)
inline

◆ fetchAndAddRelease()

int QBasicAtomicInt::fetchAndAddRelease ( int  valueToAdd)
inline

Definition at line 545 of file qatomic_alpha.h.

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

546 {
547  return q_atomic_fetch_and_add_release_int(&_q_value, valueToAdd);
548 }
volatile int _q_value
Definition: qbasicatomic.h:64
Q_CORE_EXPORT int q_atomic_fetch_and_add_release_int(volatile int *ptr, int value)

◆ fetchAndStoreAcquire()

int QBasicAtomicInt::fetchAndStoreAcquire ( int  newValue)
inline

◆ fetchAndStoreOrdered()

int QBasicAtomicInt::fetchAndStoreOrdered ( int  newValue)
inline

Definition at line 610 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), and qt_atomic_tasb().

611 {
612  return fetchAndStoreAcquire(newValue);
613 }
int fetchAndStoreAcquire(int newValue)

◆ fetchAndStoreRelaxed()

int QBasicAtomicInt::fetchAndStoreRelaxed ( int  newValue)
inline

Definition at line 520 of file qatomic_alpha.h.

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

521 {
522  return q_atomic_set_int(&_q_value, newValue);
523 }
Q_CORE_EXPORT int q_atomic_set_int(volatile int *ptr, int newval)
volatile int _q_value
Definition: qbasicatomic.h:64

◆ fetchAndStoreRelease()

int QBasicAtomicInt::fetchAndStoreRelease ( int  newValue)
inline

Definition at line 530 of file qatomic_alpha.h.

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

531 {
533 }
volatile int _q_value
Definition: qbasicatomic.h:64
int q_atomic_fetch_and_store_release_int(volatile int *ptr, int newValue)

◆ isFetchAndAddNative()

bool QBasicAtomicInt::isFetchAndAddNative ( )
inlinestatic

Definition at line 72 of file qatomic_alpha.h.

73 { return true; }

◆ isFetchAndAddWaitFree()

bool QBasicAtomicInt::isFetchAndAddWaitFree ( )
inlinestatic

Definition at line 74 of file qatomic_alpha.h.

75 { return false; }

◆ isFetchAndStoreNative()

bool QBasicAtomicInt::isFetchAndStoreNative ( )
inlinestatic

Definition at line 65 of file qatomic_alpha.h.

66 { return true; }

◆ isFetchAndStoreWaitFree()

bool QBasicAtomicInt::isFetchAndStoreWaitFree ( )
inlinestatic

Definition at line 67 of file qatomic_alpha.h.

68 { return false; }

◆ isReferenceCountingNative()

bool QBasicAtomicInt::isReferenceCountingNative ( )
inlinestatic

Definition at line 51 of file qatomic_alpha.h.

52 { return true; }

◆ isReferenceCountingWaitFree()

bool QBasicAtomicInt::isReferenceCountingWaitFree ( )
inlinestatic

Definition at line 53 of file qatomic_alpha.h.

54 { return false; }

◆ isTestAndSetNative()

bool QBasicAtomicInt::isTestAndSetNative ( )
inlinestatic

Definition at line 58 of file qatomic_alpha.h.

59 { return true; }

◆ isTestAndSetWaitFree()

bool QBasicAtomicInt::isTestAndSetWaitFree ( )
inlinestatic

Definition at line 60 of file qatomic_alpha.h.

61 { return false; }

◆ operator int()

QBasicAtomicInt::operator int ( ) const
inline

Definition at line 83 of file qbasicatomic.h.

84  {
85  return _q_value;
86  }
volatile int _q_value
Definition: qbasicatomic.h:64

◆ operator!()

bool QBasicAtomicInt::operator! ( ) const
inline

Definition at line 78 of file qbasicatomic.h.

79  {
80  return _q_value == 0;
81  }
volatile int _q_value
Definition: qbasicatomic.h:64

◆ operator!=()

bool QBasicAtomicInt::operator!= ( int  value) const
inline

Definition at line 73 of file qbasicatomic.h.

74  {
75  return _q_value != value;
76  }
volatile int _q_value
Definition: qbasicatomic.h:64

◆ operator=()

QBasicAtomicInt& QBasicAtomicInt::operator= ( int  value)
inline

Definition at line 88 of file qbasicatomic.h.

89  {
90 #ifdef QT_ARCH_PARISC
91  this->_q_lock[0] = this->_q_lock[1] = this->_q_lock[2] = this->_q_lock[3] = -1;
92 #endif
93  _q_value = value;
94  return *this;
95  }
volatile int _q_value
Definition: qbasicatomic.h:64

◆ operator==()

bool QBasicAtomicInt::operator== ( int  value) const
inline

Definition at line 68 of file qbasicatomic.h.

69  {
70  return _q_value == value;
71  }
volatile int _q_value
Definition: qbasicatomic.h:64

◆ ref()

bool QBasicAtomicInt::ref ( )
inline

◆ testAndSetAcquire()

bool QBasicAtomicInt::testAndSetAcquire ( int  expectedValue,
int  newValue 
)
inline

Definition at line 510 of file qatomic_alpha.h.

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

511 {
512  return q_atomic_test_and_set_acquire_int(&_q_value, expectedValue, newValue) != 0;
513 }
volatile int _q_value
Definition: qbasicatomic.h:64
Q_CORE_EXPORT int q_atomic_test_and_set_acquire_int(volatile int *ptr, int expected, int newval)

◆ testAndSetOrdered()

bool QBasicAtomicInt::testAndSetOrdered ( int  expectedValue,
int  newValue 
)
inline

Definition at line 605 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), and qt_atomic_tasb().

606 {
607  return testAndSetAcquire(expectedValue, newValue);
608 }
bool testAndSetAcquire(int expectedValue, int newValue)

◆ testAndSetRelaxed()

bool QBasicAtomicInt::testAndSetRelaxed ( int  expectedValue,
int  newValue 
)
inline

◆ testAndSetRelease()

bool QBasicAtomicInt::testAndSetRelease ( int  expectedValue,
int  newValue 
)
inline

Definition at line 515 of file qatomic_alpha.h.

Referenced by _q_ia64_fetchadd_immediate(), QBasicAtomicPointer< QBrushData >::isFetchAndAddWaitFree(), qt_atomic_tasb(), and QAbstractEventDispatcherPrivate::releaseTimerId().

516 {
517  return q_atomic_test_and_set_release_int(&_q_value, expectedValue, newValue) != 0;
518 }
volatile int _q_value
Definition: qbasicatomic.h:64
Q_CORE_EXPORT int q_atomic_test_and_set_release_int(volatile int *ptr, int expected, int newval)

Properties

◆ _q_value

volatile int QBasicAtomicInt::_q_value

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