QtBase
v6.3.1
|
The QAtomicPointer class is a template class that provides platform-independent atomic operations on pointers. More...
#include <qatomic.h>
Related Functions | |
(Note that these are not member functions.) | |
QT_BEGIN_NAMESPACE | |
Additional Inherited Members | |
Public Types inherited from QBasicAtomicPointer< T > | |
typedef T * | Type |
typedef QAtomicOps< Type > | Ops |
typedef Ops::Type | AtomicType |
Static Public Member Functions inherited from QBasicAtomicPointer< T > | |
static constexpr bool | isTestAndSetNative () noexcept |
static constexpr bool | isTestAndSetWaitFree () noexcept |
static constexpr bool | isFetchAndStoreNative () noexcept |
static constexpr bool | isFetchAndStoreWaitFree () noexcept |
static constexpr bool | isFetchAndAddNative () noexcept |
static constexpr bool | isFetchAndAddWaitFree () noexcept |
Public Attributes inherited from QBasicAtomicPointer< T > | |
AtomicType | _q_value |
The QAtomicPointer class is a template class that provides platform-independent atomic operations on pointers.
\macro Q_ATOMIC_INTnn_IS_SUPPORTED
This macro is defined if atomic integers of size {nn} (in bits) are supported in this compiler / architecture combination. Q_ATOMIC_INT32_IS_SUPPORTED is always defined.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_REFERENCE_COUNTING_IS_ALWAYS_NATIVE
This macro is defined if and only if all generations of your processor support atomic reference counting.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_REFERENCE_COUNTING_IS_SOMETIMES_NATIVE
This macro is defined when only certain generations of the processor support atomic reference counting. Use the QAtomicInteger<T>::isReferenceCountingNative() function to check what your processor supports.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_REFERENCE_COUNTING_IS_NOT_NATIVE
This macro is defined when the hardware does not support atomic reference counting.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_REFERENCE_COUNTING_IS_WAIT_FREE
This macro is defined together with Q_ATOMIC_INTnn_REFERENCE_COUNTING_IS_ALWAYS_NATIVE to indicate that the reference counting is wait-free.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_TEST_AND_SET_IS_ALWAYS_NATIVE
This macro is defined if and only if your processor supports atomic test-and-set on integers.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_TEST_AND_SET_IS_SOMETIMES_NATIVE
This macro is defined when only certain generations of the processor support atomic test-and-set on integers. Use the QAtomicInteger<T>::isTestAndSetNative() function to check what your processor supports.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_TEST_AND_SET_IS_NOT_NATIVE
This macro is defined when the hardware does not support atomic test-and-set on integers.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_TEST_AND_SET_IS_WAIT_FREE
This macro is defined together with Q_ATOMIC_INTnn_TEST_AND_SET_IS_ALWAYS_NATIVE to indicate that the atomic test-and-set on integers is wait-free.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_FETCH_AND_STORE_IS_ALWAYS_NATIVE
This macro is defined if and only if your processor supports atomic fetch-and-store on integers.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_FETCH_AND_STORE_IS_SOMETIMES_NATIVE
This macro is defined when only certain generations of the processor support atomic fetch-and-store on integers. Use the QAtomicInteger<T>::isFetchAndStoreNative() function to check what your processor supports.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_FETCH_AND_STORE_IS_NOT_NATIVE
This macro is defined when the hardware does not support atomic fetch-and-store on integers.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_FETCH_AND_STORE_IS_WAIT_FREE
This macro is defined together with Q_ATOMIC_INTnn_FETCH_AND_STORE_IS_ALWAYS_NATIVE to indicate that the atomic fetch-and-store on integers is wait-free.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_FETCH_AND_ADD_IS_ALWAYS_NATIVE
This macro is defined if and only if your processor supports atomic fetch-and-add on integers.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_FETCH_AND_ADD_IS_SOMETIMES_NATIVE
This macro is defined when only certain generations of the processor support atomic fetch-and-add on integers. Use the QAtomicInteger<T>::isFetchAndAddNative() function to check what your processor supports.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_FETCH_AND_ADD_IS_NOT_NATIVE
This macro is defined when the hardware does not support atomic fetch-and-add on integers.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\macro Q_ATOMIC_INTnn_FETCH_AND_ADD_IS_WAIT_FREE
This macro is defined together with Q_ATOMIC_INTnn_FETCH_AND_ADD_IS_ALWAYS_NATIVE to indicate that the atomic fetch-and-add on integers is wait-free.
{nn} is the size of the integer, in bits (8, 16, 32 or 64).
\inmodule QtCore
For atomic operations on integers, see the QAtomicInteger class.
An atomic operation is a complex operation that completes without interruption. The QAtomicPointer class provides atomic test-and-set, fetch-and-store, and fetch-and-add for pointers.
|
inlinenoexcept |
Constructs a QAtomicPointer with the given value.
Definition at line 177 of file qatomic.h.
|
inlinenoexcept |
|
inlinenoexcept |
Assigns other to this QAtomicPointer and returns a reference to this QAtomicPointer.
Definition at line 190 of file qatomic.h.
|
related |
\macro Q_ATOMIC_POINTER_TEST_AND_SET_IS_ALWAYS_NATIVE
This macro is defined if and only if your processor supports atomic test-and-set on pointers.
\macro Q_ATOMIC_POINTER_TEST_AND_SET_IS_SOMETIMES_NATIVE
This macro is defined when only certain generations of the processor support atomic test-and-set on pointers. Use the QAtomicPointer::isTestAndSetNative() function to check what your processor supports.
\macro Q_ATOMIC_POINTER_TEST_AND_SET_IS_NOT_NATIVE
This macro is defined when the hardware does not support atomic test-and-set on pointers.
\macro Q_ATOMIC_POINTER_TEST_AND_SET_IS_WAIT_FREE
This macro is defined together with Q_ATOMIC_POINTER_TEST_AND_SET_IS_ALWAYS_NATIVE to indicate that the atomic test-and-set on pointers is wait-free.
\macro Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_ALWAYS_NATIVE
This macro is defined if and only if your processor supports atomic fetch-and-store on pointers.
\macro Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_SOMETIMES_NATIVE
This macro is defined when only certain generations of the processor support atomic fetch-and-store on pointers. Use the QAtomicPointer::isFetchAndStoreNative() function to check what your processor supports.
\macro Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_NOT_NATIVE
This macro is defined when the hardware does not support atomic fetch-and-store on pointers.
\macro Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_WAIT_FREE
This macro is defined together with Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_ALWAYS_NATIVE to indicate that the atomic fetch-and-store on pointers is wait-free.
\macro Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_ALWAYS_NATIVE
This macro is defined if and only if your processor supports atomic fetch-and-add on pointers.
\macro Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_SOMETIMES_NATIVE
This macro is defined when only certain generations of the processor support atomic fetch-and-add on pointers. Use the QAtomicPointer::isFetchAndAddNative() function to check what your processor supports.
\macro Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_NOT_NATIVE
This macro is defined when the hardware does not support atomic fetch-and-add on pointers.
\macro Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_WAIT_FREE
This macro is defined together with Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_ALWAYS_NATIVE to indicate that the atomic fetch-and-add on pointers is wait-free.
Definition at line 1703 of file qatomic.cpp.