18class QAtomicInteger :
public QBasicAtomicInteger<T>
22 constexpr QAtomicInteger(T value = 0)
noexcept : QBasicAtomicInteger<T>(value) {}
24 inline QAtomicInteger(
const QAtomicInteger &other)
noexcept
25 : QBasicAtomicInteger<T>()
27 this->storeRelease(other.loadAcquire());
30 inline QAtomicInteger &operator=(
const QAtomicInteger &other)
noexcept
32 this->storeRelease(other.loadAcquire());
37 T loadRelaxed()
const;
38 T loadAcquire()
const;
39 void storeRelaxed(T newValue);
40 void storeRelease(T newValue);
43 QAtomicInteger &operator=(T);
45 static constexpr bool isReferenceCountingNative();
46 static constexpr bool isReferenceCountingWaitFree();
52 static constexpr bool isTestAndSetNative();
53 static constexpr bool isTestAndSetWaitFree();
55 bool testAndSetRelaxed(T expectedValue, T newValue);
56 bool testAndSetAcquire(T expectedValue, T newValue);
57 bool testAndSetRelease(T expectedValue, T newValue);
58 bool testAndSetOrdered(T expectedValue, T newValue);
60 bool testAndSetRelaxed(T expectedValue, T newValue, T ¤tValue);
61 bool testAndSetAcquire(T expectedValue, T newValue, T ¤tValue);
62 bool testAndSetRelease(T expectedValue, T newValue, T ¤tValue);
63 bool testAndSetOrdered(T expectedValue, T newValue, T ¤tValue);
65 static constexpr bool isFetchAndStoreNative();
66 static constexpr bool isFetchAndStoreWaitFree();
68 T fetchAndStoreRelaxed(T newValue);
69 T fetchAndStoreAcquire(T newValue);
70 T fetchAndStoreRelease(T newValue);
71 T fetchAndStoreOrdered(T newValue);
73 static constexpr bool isFetchAndAddNative();
74 static constexpr bool isFetchAndAddWaitFree();
76 T fetchAndAddRelaxed(T valueToAdd);
77 T fetchAndAddAcquire(T valueToAdd);
78 T fetchAndAddRelease(T valueToAdd);
79 T fetchAndAddOrdered(T valueToAdd);
81 T fetchAndSubRelaxed(T valueToSub);
82 T fetchAndSubAcquire(T valueToSub);
83 T fetchAndSubRelease(T valueToSub);
84 T fetchAndSubOrdered(T valueToSub);
86 T fetchAndOrRelaxed(T valueToOr);
87 T fetchAndOrAcquire(T valueToOr);
88 T fetchAndOrRelease(T valueToOr);
89 T fetchAndOrOrdered(T valueToOr);
91 T fetchAndAndRelaxed(T valueToAnd);
92 T fetchAndAndAcquire(T valueToAnd);
93 T fetchAndAndRelease(T valueToAnd);
94 T fetchAndAndOrdered(T valueToAnd);
96 T fetchAndXorRelaxed(T valueToXor);
97 T fetchAndXorAcquire(T valueToXor);
98 T fetchAndXorRelease(T valueToXor);
99 T fetchAndXorOrdered(T valueToXor);
105 T operator+=(T value);
106 T operator-=(T value);
107 T operator|=(T value);
108 T operator&=(T value);
109 T operator^=(T value);