QtCore/qbasicatomic.h Source File
Go to the documentation of this file.
42 #ifndef QBASICATOMIC_H
43 #define QBASICATOMIC_H
59 #if defined(QT_ARCH_WINDOWS) || defined(QT_ARCH_WINDOWSCE)
64 volatile int _q_value;
70 return _q_value ==
value;
75 return _q_value !=
value;
83 inline operator int()
const
91 this->_q_lock[0] = this->_q_lock[1] = this->_q_lock[2] = this->_q_lock[3] = -1;
99 static bool isReferenceCountingNative();
100 static bool isReferenceCountingWaitFree();
105 static bool isTestAndSetNative();
106 static bool isTestAndSetWaitFree();
108 bool testAndSetRelaxed(
int expectedValue,
int newValue);
109 bool testAndSetAcquire(
int expectedValue,
int newValue);
110 bool testAndSetRelease(
int expectedValue,
int newValue);
111 bool testAndSetOrdered(
int expectedValue,
int newValue);
113 static bool isFetchAndStoreNative();
114 static bool isFetchAndStoreWaitFree();
116 int fetchAndStoreRelaxed(
int newValue);
117 int fetchAndStoreAcquire(
int newValue);
118 int fetchAndStoreRelease(
int newValue);
119 int fetchAndStoreOrdered(
int newValue);
121 static bool isFetchAndAddNative();
122 static bool isFetchAndAddWaitFree();
124 int fetchAndAddRelaxed(
int valueToAdd);
125 int fetchAndAddAcquire(
int valueToAdd);
126 int fetchAndAddRelease(
int valueToAdd);
127 int fetchAndAddOrdered(
int valueToAdd);
130 template <
typename T>
134 #ifdef QT_ARCH_PARISC
137 #if defined(QT_ARCH_WINDOWS) || defined(QT_ARCH_WINDOWSCE)
140 # if !defined(Q_OS_WINCE) && !defined(__i386__) && !defined(_M_IX86)
154 return _q_value ==
value;
167 inline operator T *()
const
179 #ifdef QT_ARCH_PARISC
180 this->_q_lock[0] = this->_q_lock[1] = this->_q_lock[2] = this->_q_lock[3] = -1;
213 #ifdef QT_ARCH_PARISC
214 # define Q_BASIC_ATOMIC_INITIALIZER(a) {{-1,-1,-1,-1},(a)}
215 #elif defined(QT_ARCH_WINDOWS) || defined(QT_ARCH_WINDOWSCE)
216 # define Q_BASIC_ATOMIC_INITIALIZER(a) { {(a)} }
218 # define Q_BASIC_ATOMIC_INITIALIZER(a) { (a) }
224 #if defined(QT_MOC) || defined(QT_BUILD_QMAKE) || defined(QT_RCC) || defined(QT_UIC) || defined(QT_BOOTSTRAPPED)
230 #endif // QBASIC_ATOMIC
unsigned int(APIENTRYP PFNGLXGETAGPOFFSETMESAPROC)(const void *pointer)
T * fetchAndAddAcquire(qptrdiff valueToAdd)
T * fetchAndAddOrdered(qptrdiff valueToAdd)
QBasicAtomicInt & operator=(int value)
bool operator==(int value) const
QBasicAtomicPointer< T > & operator=(T *value)
T * fetchAndStoreAcquire(T *newValue)
T * fetchAndAddRelease(qptrdiff valueToAdd)
T * fetchAndAddRelaxed(qptrdiff valueToAdd)
static bool isFetchAndAddNative()
bool testAndSetOrdered(T *expectedValue, T *newValue)
static bool isFetchAndStoreNative()
#define QT_BEGIN_NAMESPACE
static bool isTestAndSetNative()
T * fetchAndStoreRelaxed(T *newValue)
bool operator==(T *value) const
static bool isFetchAndAddWaitFree()
bool operator!=(T *value) const
T * fetchAndStoreRelease(T *newValue)
bool testAndSetRelease(T *expectedValue, T *newValue)
static bool isFetchAndStoreWaitFree()
GLsizei const GLfloat * value
bool testAndSetAcquire(T *expectedValue, T *newValue)
T * fetchAndStoreOrdered(T *newValue)
qint64 volatile _q_value_integral
bool operator!=(int value) const
bool testAndSetRelaxed(T *expectedValue, T *newValue)
static bool isTestAndSetWaitFree()