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>
bb10
Thiago Macieira 2021-12-01 15:50:09 -08:00
parent c38639089f
commit 154d87f23f
1 changed files with 8 additions and 0 deletions

View File

@ -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;