42 #ifndef QATOMIC_VXWORKS_H
43 #define QATOMIC_VXWORKS_H
49 #else // generic implementation with taskLock()
54 # include <vxWorksCommon.h>
57 #if defined(_WRS_KERNEL)
70 #define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_NOT_NATIVE
77 #define Q_ATOMIC_INT_TEST_AND_SET_IS_NOT_NATIVE
84 #define Q_ATOMIC_INT_FETCH_AND_STORE_IS_NOT_NATIVE
91 #define Q_ATOMIC_INT_FETCH_AND_ADD_IS_NOT_NATIVE
98 #define Q_ATOMIC_POINTER_TEST_AND_SET_IS_NOT_NATIVE
100 template <
typename T>
103 template <
typename T>
107 #define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_NOT_NATIVE
109 template <
typename T>
112 template <
typename T>
116 #define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_NOT_NATIVE
118 template <
typename T>
121 template <
typename T>
206 return originalValue;
226 template <
typename T>
230 if (_q_value == expectedValue) {
239 template <
typename T>
242 return testAndSetOrdered(expectedValue, newValue);
245 template <
typename T>
248 return testAndSetOrdered(expectedValue, newValue);
251 template <
typename T>
254 return testAndSetOrdered(expectedValue, newValue);
259 template <
typename T>
263 T *returnValue = (_q_value);
269 template <
typename T>
272 return fetchAndStoreOrdered(newValue);
275 template <
typename T>
278 return fetchAndStoreOrdered(newValue);
281 template <
typename T>
284 return fetchAndStoreOrdered(newValue);
289 template <
typename T>
293 T *returnValue = (_q_value);
294 _q_value += valueToAdd;
299 template <
typename T>
302 return fetchAndAddOrdered(valueToAdd);
305 template <
typename T>
308 return fetchAndAddOrdered(valueToAdd);
311 template <
typename T>
314 return fetchAndAddOrdered(valueToAdd);
319 #endif // generic implementation with taskLock()
323 #endif // QATOMIC_VXWORKS_H
int fetchAndStoreRelaxed(int newValue)
bool testAndSetRelease(int expectedValue, int newValue)
static bool isFetchAndAddNative()
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()
QT_BEGIN_HEADER int taskLock()
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)
T * fetchAndStoreRelease(T *newValue)
bool testAndSetRelease(T *expectedValue, T *newValue)
static bool isFetchAndStoreWaitFree()
static bool isTestAndSetWaitFree()
bool testAndSetAcquire(T *expectedValue, T *newValue)
static bool isFetchAndAddWaitFree()
T * fetchAndStoreOrdered(T *newValue)
static bool isFetchAndStoreWaitFree()
bool testAndSetRelaxed(T *expectedValue, T *newValue)
int fetchAndStoreAcquire(int newValue)
static bool isTestAndSetWaitFree()
bool testAndSetOrdered(int expectedValue, int newValue)
int fetchAndAddOrdered(int valueToAdd)
int fetchAndStoreOrdered(int newValue)
int fetchAndAddRelease(int valueToAdd)
int fetchAndStoreRelease(int newValue)