summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2021-12-01 15:50:09 -0800
committerThiago Macieira <thiago.macieira@intel.com>2021-12-11 11:54:36 -0800
commit154d87f23f82f7419373822494c33d2b0e612af8 (patch)
treec58589d9631d7c47756c4acb5bef4a296eccb01f /src/corelib/thread
parentc38639089f0e17a3da40dca03fecac88f5d89ba9 (diff)
Enable other integer sizes in the bootstrap library's QAtomicInteger
They're not atomic anyway. But it does make it possible to use QAtomicInteger in both bootstrapped and non-bootstrapped code. Change-Id: I2cffe62afda945079b63fffd16bcc67e082d92ae Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qatomic_bootstrap.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/corelib/thread/qatomic_bootstrap.h b/src/corelib/thread/qatomic_bootstrap.h
index c4279ee7b1..125803a15c 100644
--- a/src/corelib/thread/qatomic_bootstrap.h
+++ b/src/corelib/thread/qatomic_bootstrap.h
@@ -52,6 +52,14 @@ QT_END_NAMESPACE
#pragma qt_sync_stop_processing
#endif
+#define Q_ATOMIC_INT8_IS_SUPPORTED
+template<> struct QAtomicOpsSupport<1> { enum { IsSupported = 1 }; };
+#define Q_ATOMIC_INT16_IS_SUPPORTED
+template<> struct QAtomicOpsSupport<2> { enum { IsSupported = 1 }; };
+#define Q_ATOMIC_INT32_IS_SUPPORTED
+#define Q_ATOMIC_INT64_IS_SUPPORTED
+template<> struct QAtomicOpsSupport<8> { enum { IsSupported = 1 }; };
+
template <typename T> struct QAtomicOps: QGenericAtomicOps<QAtomicOps<T> >
{
typedef T Type;