42 #ifndef QATOMIC_ALPHA_H 43 #define QATOMIC_ALPHA_H 49 #define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_ALWAYS_NATIVE 56 #define Q_ATOMIC_INT_TEST_AND_SET_IS_ALWAYS_NATIVE 63 #define Q_ATOMIC_INT_FETCH_AND_STORE_IS_ALWAYS_NATIVE 70 #define Q_ATOMIC_INT_FETCH_AND_ADD_IS_ALWAYS_NATIVE 77 #define Q_ATOMIC_POINTER_TEST_AND_SET_IS_ALWAYS_NATIVE 86 #define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_ALWAYS_NATIVE 95 #define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_ALWAYS_NATIVE 100 template <
typename T>
104 #if defined(Q_CC_GNU) 108 register int old, tmp;
117 :
"=&r" (old),
"=&r" (tmp),
"+m"(
_q_value)
125 register int old, tmp;
134 :
"=&r" (old),
"=&r" (tmp),
"+m"(
_q_value)
154 :
"r" (expectedValue),
"r" (newValue)
174 :
"r" (expectedValue),
"r" (newValue)
194 :
"r" (expectedValue),
"r" (newValue)
201 register int old, tmp;
210 :
"=&r" (old),
"=&r" (tmp),
"+m" (
_q_value)
218 register int old, tmp;
228 :
"=&r" (old),
"=&r" (tmp),
"+m" (
_q_value)
236 register int old, tmp;
246 :
"=&r" (old),
"=&r" (tmp),
"+m" (
_q_value)
254 register int old, tmp;
263 :
"=&r" (old),
"=&r" (tmp),
"+m"(
_q_value)
271 register int old, tmp;
281 :
"=&r" (old),
"=&r" (tmp),
"+m"(
_q_value)
289 register int old, tmp;
299 :
"=&r" (old),
"=&r" (tmp),
"+m"(
_q_value)
305 template <
typename T>
320 :
"r" (expectedValue),
"r" (newValue)
325 template <
typename T>
341 :
"r" (expectedValue),
"r" (newValue)
346 template <
typename T>
362 :
"r" (expectedValue),
"r" (newValue)
367 template <
typename T>
370 register T *old, *tmp;
379 :
"=&r" (old),
"=&r" (tmp),
"+m" (
_q_value)
385 template <
typename T>
388 register T *old, *tmp;
398 :
"=&r" (old),
"=&r" (tmp),
"+m" (
_q_value)
404 template <
typename T>
407 register T *old, *tmp;
417 :
"=&r" (old),
"=&r" (tmp),
"+m" (
_q_value)
423 template <
typename T>
426 register T *old, *tmp;
435 :
"=&r" (old),
"=&r" (tmp),
"+m"(
_q_value)
438 return reinterpret_cast<T *
>(old);
441 template <
typename T>
444 register T *old, *tmp;
454 :
"=&r" (old),
"=&r" (tmp),
"+m"(
_q_value)
457 return reinterpret_cast<T *
>(old);
460 template <
typename T>
463 register T *old, *tmp;
473 :
"=&r" (old),
"=&r" (tmp),
"+m"(
_q_value)
476 return reinterpret_cast<T *
>(old);
550 template <
typename T>
556 template <
typename T>
562 template <
typename T>
568 template <
typename T>
574 template <
typename T>
580 template <
typename T>
586 template <
typename T>
591 template <
typename T>
597 template <
typename T>
620 template <
typename T>
626 template <
typename T>
632 template <
typename T>
642 #endif // QATOMIC_ALPHA_H void * q_atomic_fetch_and_add_acquire_ptr(volatile void *ptr, qptrdiff valueToAdd)
static bool isFetchAndStoreNative()
static bool isTestAndSetNative()
Q_CORE_EXPORT int q_atomic_set_int(volatile int *ptr, int newval)
int fetchAndStoreRelease(int newValue)
int q_atomic_fetch_and_store_release_ptr(volatile void *ptr, void *newValue)
static bool isReferenceCountingNative()
T * fetchAndAddRelaxed(qptrdiff valueToAdd)
Q_CORE_EXPORT int q_atomic_fetch_and_add_int(volatile int *ptr, int value)
#define QT_END_NAMESPACE
This macro expands to.
static bool isFetchAndAddNative()
static bool isTestAndSetNative()
static bool isFetchAndAddNative()
Q_CORE_EXPORT int q_atomic_test_and_set_acquire_ptr(volatile void *ptr, void *expected, void *newval)
T * fetchAndStoreRelease(T *newValue)
static bool isTestAndSetWaitFree()
int q_atomic_fetch_and_store_release_int(volatile int *ptr, int newValue)
Q_CORE_EXPORT void * q_atomic_fetch_and_add_ptr(volatile void *ptr, int value)
int q_atomic_fetch_and_store_acquire_ptr(volatile void *ptr, void *newValue)
T * fetchAndAddRelease(qptrdiff valueToAdd)
bool testAndSetOrdered(T *expectedValue, T *newValue)
int fetchAndAddAcquire(int valueToAdd)
Q_CORE_EXPORT int q_atomic_test_and_set_acquire_int(volatile int *ptr, int expected, int newval)
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.
Q_CORE_EXPORT int q_atomic_fetch_and_add_acquire_int(volatile int *ptr, int value)
Q_CORE_EXPORT int q_atomic_test_and_set_ptr(volatile void *ptr, void *expected, void *newval)
int fetchAndStoreAcquire(int newValue)
Q_CORE_EXPORT int q_atomic_increment(volatile int *ptr)
QIntegerForSizeof< void * >::Signed qptrdiff
Q_CORE_EXPORT int q_atomic_test_and_set_release_int(volatile int *ptr, int expected, int newval)
T * fetchAndStoreOrdered(T *newValue)
#define Q_INLINE_TEMPLATE
int fetchAndAddRelease(int valueToAdd)
Q_CORE_EXPORT int q_atomic_fetch_and_add_release_int(volatile int *ptr, int value)
const T * ptr(const T &t)
bool testAndSetOrdered(int expectedValue, int newValue)
T * fetchAndStoreAcquire(T *newValue)
void * q_atomic_fetch_and_add_release_ptr(volatile void *ptr, qptrdiff valueToAdd)
static bool isFetchAndStoreWaitFree()
static bool isTestAndSetWaitFree()
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 int q_atomic_test_and_set_int(volatile int *ptr, int expected, int newval)
Q_CORE_EXPORT int q_atomic_decrement(volatile int *ptr)
int fetchAndAddRelaxed(int valueToAdd)
int fetchAndStoreOrdered(int newValue)
bool testAndSetRelaxed(T *expectedValue, T *newValue)
Q_CORE_EXPORT int q_atomic_test_and_set_release_ptr(volatile void *ptr, void *expected, void *newval)
bool testAndSetRelease(T *expectedValue, T *newValue)
int q_atomic_fetch_and_store_acquire_int(volatile int *ptr, int newValue)
T * fetchAndStoreRelaxed(T *newValue)
static bool isFetchAndStoreNative()
bool testAndSetAcquire(T *expectedValue, T *newValue)
Q_CORE_EXPORT void * q_atomic_set_ptr(volatile void *ptr, void *newval)