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>
110 asm volatile(
"tas.b @%2\n" 112 :
"=&r"(ret),
"=m"(*ptr)
127 return originalValue != -1;
137 return originalValue != 1;
144 bool returnValue =
false;
181 return originalValue;
209 return originalValue;
229 template <
typename T>
232 bool returnValue =
false;
244 template <
typename T>
250 template <
typename T>
256 template <
typename T>
264 template <
typename T>
273 return originalValue;
276 template <
typename T>
282 template <
typename T>
288 template <
typename T>
296 template <
typename T>
305 return originalValue;
308 template <
typename T>
314 template <
typename T>
320 template <
typename T>
330 #endif // QATOMIC_SH_H static bool isFetchAndStoreNative()
static bool isTestAndSetNative()
int fetchAndStoreRelease(int newValue)
static bool isReferenceCountingNative()
T * fetchAndAddRelaxed(qptrdiff valueToAdd)
#define QT_END_NAMESPACE
This macro expands to.
static bool isFetchAndAddNative()
static bool isTestAndSetNative()
static bool isFetchAndAddNative()
T * fetchAndStoreRelease(T *newValue)
static bool isTestAndSetWaitFree()
T * fetchAndAddRelease(qptrdiff valueToAdd)
bool testAndSetOrdered(T *expectedValue, T *newValue)
int fetchAndAddAcquire(int valueToAdd)
T * fetchAndAddAcquire(qptrdiff valueToAdd)
int fetchAndStoreRelaxed(int newValue)
T * fetchAndAddOrdered(qptrdiff valueToAdd)
bool testAndSetAcquire(int expectedValue, int newValue)
bool testAndSetRelaxed(int expectedValue, int newValue)
#define QT_BEGIN_NAMESPACE
This macro expands to.
int fetchAndStoreAcquire(int newValue)
QIntegerForSizeof< void * >::Signed qptrdiff
T * fetchAndStoreOrdered(T *newValue)
Q_CORE_EXPORT void qt_atomic_yield(int *count)
#define Q_INLINE_TEMPLATE
int fetchAndAddRelease(int valueToAdd)
const T * ptr(const T &t)
bool testAndSetOrdered(int expectedValue, int newValue)
T * fetchAndStoreAcquire(T *newValue)
static bool isFetchAndStoreWaitFree()
static bool isTestAndSetWaitFree()
int qt_atomic_tasb(volatile char *ptr)
static bool isReferenceCountingWaitFree()
int fetchAndAddOrdered(int valueToAdd)
static bool isFetchAndStoreWaitFree()
static bool isFetchAndAddWaitFree()
static bool isFetchAndAddWaitFree()
bool testAndSetRelease(int expectedValue, int newValue)
Q_CORE_EXPORT volatile char qt_atomic_lock
int fetchAndAddRelaxed(int valueToAdd)
int fetchAndStoreOrdered(int newValue)
bool testAndSetRelaxed(T *expectedValue, T *newValue)
bool testAndSetRelease(T *expectedValue, T *newValue)
T * fetchAndStoreRelaxed(T *newValue)
static bool isFetchAndStoreNative()
bool testAndSetAcquire(T *expectedValue, T *newValue)