From 154d87f23f82f7419373822494c33d2b0e612af8 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 1 Dec 2021 15:50:09 -0800 Subject: [PATCH] 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 Reviewed-by: Edward Welbourne --- src/corelib/thread/qatomic_bootstrap.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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 struct QAtomicOps: QGenericAtomicOps > { typedef T Type;