42 #ifndef QATOMIC_AVR32_H 43 #define QATOMIC_AVR32_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 64 #define Q_ATOMIC_INT_FETCH_AND_STORE_IS_WAIT_FREE 71 #define Q_ATOMIC_INT_FETCH_AND_ADD_IS_ALWAYS_NATIVE 78 #define Q_ATOMIC_POINTER_TEST_AND_SET_IS_ALWAYS_NATIVE 87 #define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_ALWAYS_NATIVE 88 #define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_WAIT_FREE 97 #define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_ALWAYS_NATIVE 102 template <
typename T>
108 return __sync_add_and_fetch(&
_q_value, 1);
113 return __sync_sub_and_fetch(&
_q_value, 1);
118 return __sync_bool_compare_and_swap(&
_q_value, expectedValue, newValue);
138 return __sync_lock_test_and_set(&
_q_value, newValue);
158 return __sync_fetch_and_add(&
_q_value, valueToAdd);
176 template <
typename T>
179 return __sync_bool_compare_and_swap(&
_q_value, expectedValue, newValue);
182 template <
typename T>
188 template <
typename T>
194 template <
typename T>
200 template <
typename T>
203 return __sync_lock_test_and_set(&
_q_value, newValue);
206 template <
typename T>
212 template <
typename T>
218 template <
typename T>
224 template <
typename T>
227 return __sync_fetch_and_add(&
_q_value, valueToAdd *
sizeof(T));
230 template <
typename T>
236 template <
typename T>
242 template <
typename T>
252 #endif // QATOMIC_AVR32_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)
#define Q_INLINE_TEMPLATE
int fetchAndAddRelease(int valueToAdd)
bool testAndSetOrdered(int expectedValue, int newValue)
T * fetchAndStoreAcquire(T *newValue)
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)
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)