42 #ifndef QATOMIC_GENERIC_H
43 #define QATOMIC_GENERIC_H
49 #define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_NOT_NATIVE
56 #define Q_ATOMIC_INT_TEST_AND_SET_IS_NOT_NATIVE
63 #define Q_ATOMIC_INT_FETCH_AND_STORE_IS_NOT_NATIVE
70 #define Q_ATOMIC_INT_FETCH_AND_ADD_IS_NOT_NATIVE
77 #define Q_ATOMIC_POINTER_TEST_AND_SET_IS_NOT_NATIVE
86 #define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_NOT_NATIVE
95 #define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_NOT_NATIVE
100 template <
typename T>
192 template <
typename T>
195 union { T *
volatile * typed;
void *
volatile * voidp; }
pointer;
200 template <
typename T>
203 return testAndSetOrdered(expectedValue, newValue);
206 template <
typename T>
209 return testAndSetOrdered(expectedValue, newValue);
212 template <
typename T>
215 return testAndSetOrdered(expectedValue, newValue);
220 template <
typename T>
223 union { T *
volatile * typed;
void *
volatile * voidp; }
pointer;
224 union { T *typed;
void *voidp; } returnValue;
227 return returnValue.typed;
230 template <
typename T>
233 return fetchAndStoreOrdered(newValue);
236 template <
typename T>
239 return fetchAndStoreOrdered(newValue);
242 template <
typename T>
245 return fetchAndStoreOrdered(newValue);
250 template <
typename T>
253 union { T *
volatile *typed;
void *
volatile *voidp; }
pointer;
254 union { T *typed;
void *voidp; } returnValue;
257 return returnValue.typed;
260 template <
typename T>
263 return fetchAndAddOrdered(valueToAdd);
266 template <
typename T>
269 return fetchAndAddOrdered(valueToAdd);
272 template <
typename T>
275 return fetchAndAddOrdered(valueToAdd);
282 #endif // QATOMIC_GENERIC_H
int fetchAndStoreRelaxed(int newValue)
bool testAndSetRelease(int expectedValue, int newValue)
static bool isFetchAndAddNative()
Q_CORE_EXPORT bool QBasicAtomicInt_testAndSetOrdered(volatile int *, int, int)
Q_CORE_EXPORT int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *, int)
T * fetchAndAddAcquire(qptrdiff valueToAdd)
T * fetchAndAddOrdered(qptrdiff valueToAdd)
static bool isReferenceCountingNative()
int fetchAndAddRelaxed(int valueToAdd)
T * fetchAndStoreAcquire(T *newValue)
T * fetchAndAddRelease(qptrdiff valueToAdd)
int fetchAndAddAcquire(int valueToAdd)
static bool isReferenceCountingWaitFree()
T * fetchAndAddRelaxed(qptrdiff valueToAdd)
static bool isFetchAndAddNative()
bool testAndSetOrdered(T *expectedValue, T *newValue)
bool testAndSetAcquire(int expectedValue, int newValue)
static bool isFetchAndStoreNative()
#define QT_BEGIN_NAMESPACE
static bool isTestAndSetNative()
static bool isTestAndSetNative()
static bool isFetchAndStoreNative()
T * fetchAndStoreRelaxed(T *newValue)
static bool isFetchAndAddWaitFree()
bool testAndSetRelaxed(int expectedValue, int newValue)
Q_CORE_EXPORT void * QBasicAtomicPointer_fetchAndAddOrdered(void *volatile *, qptrdiff)
T * fetchAndStoreRelease(T *newValue)
bool testAndSetRelease(T *expectedValue, T *newValue)
static bool isFetchAndStoreWaitFree()
static bool isTestAndSetWaitFree()
Q_CORE_EXPORT bool QBasicAtomicPointer_testAndSetOrdered(void *volatile *, void *, void *)
bool testAndSetAcquire(T *expectedValue, T *newValue)
static bool isFetchAndAddWaitFree()
T * fetchAndStoreOrdered(T *newValue)
Q_CORE_EXPORT int QBasicAtomicInt_fetchAndAddOrdered(volatile int *, int)
static bool isFetchAndStoreWaitFree()
bool testAndSetRelaxed(T *expectedValue, T *newValue)
int fetchAndStoreAcquire(int newValue)
static bool isTestAndSetWaitFree()
bool testAndSetOrdered(int expectedValue, int newValue)
Q_CORE_EXPORT void * QBasicAtomicPointer_fetchAndStoreOrdered(void *volatile *, void *)
int fetchAndAddOrdered(int valueToAdd)
int fetchAndStoreOrdered(int newValue)
int fetchAndAddRelease(int valueToAdd)
int fetchAndStoreRelease(int newValue)
GLsizei const GLvoid * pointer