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();
51 static constexpr bool isTestAndSetNative();
52 static constexpr bool isTestAndSetWaitFree();
54 bool testAndSetRelaxed(T expectedValue, T newValue);
55 bool testAndSetAcquire(T expectedValue, T newValue);
56 bool testAndSetRelease(T expectedValue, T newValue);
57 bool testAndSetOrdered(T expectedValue, T newValue);
59 bool testAndSetRelaxed(T expectedValue, T newValue, T ¤tValue);
60 bool testAndSetAcquire(T expectedValue, T newValue, T ¤tValue);
61 bool testAndSetRelease(T expectedValue, T newValue, T ¤tValue);
62 bool testAndSetOrdered(T expectedValue, T newValue, T ¤tValue);
64 static constexpr bool isFetchAndStoreNative();
65 static constexpr bool isFetchAndStoreWaitFree();
67 T fetchAndStoreRelaxed(T newValue);
68 T fetchAndStoreAcquire(T newValue);
69 T fetchAndStoreRelease(T newValue);
70 T fetchAndStoreOrdered(T newValue);
72 static constexpr bool isFetchAndAddNative();
73 static constexpr bool isFetchAndAddWaitFree();
75 T fetchAndAddRelaxed(T valueToAdd);
76 T fetchAndAddAcquire(T valueToAdd);
77 T fetchAndAddRelease(T valueToAdd);
78 T fetchAndAddOrdered(T valueToAdd);
80 T fetchAndSubRelaxed(T valueToSub);
81 T fetchAndSubAcquire(T valueToSub);
82 T fetchAndSubRelease(T valueToSub);
83 T fetchAndSubOrdered(T valueToSub);
85 T fetchAndOrRelaxed(T valueToOr);
86 T fetchAndOrAcquire(T valueToOr);
87 T fetchAndOrRelease(T valueToOr);
88 T fetchAndOrOrdered(T valueToOr);
90 T fetchAndAndRelaxed(T valueToAnd);
91 T fetchAndAndAcquire(T valueToAnd);
92 T fetchAndAndRelease(T valueToAnd);
93 T fetchAndAndOrdered(T valueToAnd);
95 T fetchAndXorRelaxed(T valueToXor);
96 T fetchAndXorAcquire(T valueToXor);
97 T fetchAndXorRelease(T valueToXor);
98 T fetchAndXorOrdered(T valueToXor);
104 T operator+=(T value);
105 T operator-=(T value);
106 T operator|=(T value);
107 T operator&=(T value);
108 T operator^=(T value);