summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/thread/qbasicatomic.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/thread/qbasicatomic.h b/src/corelib/thread/qbasicatomic.h
index 790d39bf42..6519d4e401 100644
--- a/src/corelib/thread/qbasicatomic.h
+++ b/src/corelib/thread/qbasicatomic.h
@@ -96,6 +96,11 @@ public:
// Atomic API, implemented in qatomic_XXX.h
+ int load() const { return _q_value; }
+ int loadAcquire() { return _q_value; }
+ void store(int newValue) { _q_value = newValue; }
+ void storeRelease(int newValue) { _q_value = newValue; }
+
static bool isReferenceCountingNative();
static bool isReferenceCountingWaitFree();
@@ -185,6 +190,11 @@ public:
// Atomic API, implemented in qatomic_XXX.h
+ T *load() const { return _q_value; }
+ T *loadAcquire() { return _q_value; }
+ void store(T *newValue) { _q_value = newValue; }
+ void storeRelease(T *newValue) { _q_value = newValue; }
+
static bool isTestAndSetNative();
static bool isTestAndSetWaitFree();