17class QAtomicInteger :
public QBasicAtomicInteger<T>
21 constexpr QAtomicInteger(T value = 0)
noexcept : QBasicAtomicInteger<T>(value) {}
23 inline QAtomicInteger(
const QAtomicInteger &other)
noexcept
24 : QBasicAtomicInteger<T>()
26 this->storeRelease(other.loadAcquire());
29 inline QAtomicInteger &operator=(
const QAtomicInteger &other)
noexcept
31 this->storeRelease(other.loadAcquire());
36 T loadRelaxed()
const;
37 T loadAcquire()
const;
38 void storeRelaxed(T newValue);
39 void storeRelease(T newValue);
42 QAtomicInteger &operator=(T);
44 static constexpr bool isReferenceCountingNative();
45 static constexpr bool isReferenceCountingWaitFree();
50 static constexpr bool isTestAndSetNative();
51 static constexpr bool isTestAndSetWaitFree();
53 bool testAndSetRelaxed(T expectedValue, T newValue);
54 bool testAndSetAcquire(T expectedValue, T newValue);
55 bool testAndSetRelease(T expectedValue, T newValue);
56 bool testAndSetOrdered(T expectedValue, T newValue);
58 bool testAndSetRelaxed(T expectedValue, T newValue, T ¤tValue);
59 bool testAndSetAcquire(T expectedValue, T newValue, T ¤tValue);
60 bool testAndSetRelease(T expectedValue, T newValue, T ¤tValue);
61 bool testAndSetOrdered(T expectedValue, T newValue, T ¤tValue);
63 static constexpr bool isFetchAndStoreNative();
64 static constexpr bool isFetchAndStoreWaitFree();
66 T fetchAndStoreRelaxed(T newValue);
67 T fetchAndStoreAcquire(T newValue);
68 T fetchAndStoreRelease(T newValue);
69 T fetchAndStoreOrdered(T newValue);
71 static constexpr bool isFetchAndAddNative();
72 static constexpr bool isFetchAndAddWaitFree();
74 T fetchAndAddRelaxed(T valueToAdd);
75 T fetchAndAddAcquire(T valueToAdd);
76 T fetchAndAddRelease(T valueToAdd);
77 T fetchAndAddOrdered(T valueToAdd);
79 T fetchAndSubRelaxed(T valueToSub);
80 T fetchAndSubAcquire(T valueToSub);
81 T fetchAndSubRelease(T valueToSub);
82 T fetchAndSubOrdered(T valueToSub);
84 T fetchAndOrRelaxed(T valueToOr);
85 T fetchAndOrAcquire(T valueToOr);
86 T fetchAndOrRelease(T valueToOr);
87 T fetchAndOrOrdered(T valueToOr);
89 T fetchAndAndRelaxed(T valueToAnd);
90 T fetchAndAndAcquire(T valueToAnd);
91 T fetchAndAndRelease(T valueToAnd);
92 T fetchAndAndOrdered(T valueToAnd);
94 T fetchAndXorRelaxed(T valueToXor);
95 T fetchAndXorAcquire(T valueToXor);
96 T fetchAndXorRelease(T valueToXor);
97 T fetchAndXorOrdered(T valueToXor);
103 T operator+=(T value);
104 T operator-=(T value);
105 T operator|=(T value);
106 T operator&=(T value);
107 T operator^=(T value);