|
LMMS
|
Public Member Functions | |
| Atomic () noexcept | |
| Atomic (const Type initialValue) noexcept | |
| Atomic (const Atomic &other) noexcept | |
| ~Atomic () noexcept | |
| Type | get () const noexcept |
| Atomic & | operator= (const Atomic &other) noexcept |
| Atomic & | operator= (const Type newValue) noexcept |
| void | set (Type newValue) noexcept |
| Type | exchange (Type value) noexcept |
| Type | operator+= (Type amountToAdd) noexcept |
| Type | operator-= (Type amountToSubtract) noexcept |
| Type | operator++ () noexcept |
| Type | operator-- () noexcept |
| bool | compareAndSetBool (Type newValue, Type valueToCompare) noexcept |
| Type | compareAndSetValue (Type newValue, Type valueToCompare) noexcept |
| __attribute__ ((aligned(WATER_ALIGN_SIZE))) mutable volatile Type value | |
| int32 | get () const noexcept |
| uint32 | get () const noexcept |
| int64 | get () const noexcept |
| uint64 | get () const noexcept |
Static Public Member Functions | |
| static void | memoryBarrier () noexcept |
Private Member Functions | |
| Type | operator++ (int) |
| Type | operator-- (int) |
| template<typename ValueType> | |
| ValueType | negateValue (ValueType n) noexcept |
| template<typename PointerType> | |
| PointerType * | negateValue (PointerType *n) noexcept |
Static Private Member Functions | |
| template<typename Dest, typename Source> | |
| static Dest | castTo (Source value) noexcept |
| static Type | castFrom32Bit (int32 value) noexcept |
| static Type | castFrom64Bit (int64 value) noexcept |
| static Type | castFrom32Bit (uint32 value) noexcept |
| static Type | castFrom64Bit (uint64 value) noexcept |
| static Type | castFromLong (long value) noexcept |
| static int32 | castTo32Bit (Type value) noexcept |
| static int64 | castTo64Bit (Type value) noexcept |
| static long | castToLong (Type value) noexcept |
Simple class to hold a primitive value and perform atomic operations on it.
The type used must be a 32 or 64 bit primitive, like an int, pointer, etc. There are methods to perform most of the basic atomic operations.
|
inlinenoexcept |
Creates a new value, initialised to zero.
|
inlineexplicitnoexcept |
Creates a new value, with a given initial value.
|
inlinenoexcept |
Copies another value (atomically).
|
inlinenoexcept |
Destructor.
| juce::pnglibNamespace::water::Atomic< Type >::__attribute__ | ( | (aligned(WATER_ALIGN_SIZE)) | ) | volatile |
The raw value that this class operates on. This is exposed publicly in case you need to manipulate it directly for performance reasons.
|
inlinestaticprivatenoexcept |
|
inlinestaticprivatenoexcept |
|
inlinestaticprivatenoexcept |
|
inlinestaticprivatenoexcept |
|
inlinestaticprivatenoexcept |
|
inlinestaticprivatenoexcept |
|
inlinestaticprivatenoexcept |
|
inlinestaticprivatenoexcept |
|
inlinestaticprivatenoexcept |
|
inlinenoexcept |
Atomically compares this value with a target value, and if it is equal, sets this to be equal to a new value.
This operation is the atomic equivalent of doing this:
|
inlinenoexcept |
Atomically compares this value with a target value, and if it is equal, sets this to be equal to a new value.
This operation is the atomic equivalent of doing this:
|
inlinenoexcept |
Atomically sets the current value, returning the value that was replaced.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
Atomically reads and returns the current value.
|
inlinestaticnoexcept |
Implements a memory read/write barrier.
|
inlineprivatenoexcept |
This templated negate function will negate pointers as well as integers
|
inlineprivatenoexcept |
This templated negate function will negate pointers as well as integers
|
inlinenoexcept |
Atomically increments this value, returning the new value.
|
private |
|
inlinenoexcept |
Atomically adds a number to this value, returning the new value.
|
inlinenoexcept |
Atomically decrements this value, returning the new value.
|
private |
|
inlinenoexcept |
Atomically subtracts a number from this value, returning the new value.
|
inlinenoexcept |
Copies another value onto this one (atomically).
|
inlinenoexcept |
Copies another value onto this one (atomically).
|
inlinenoexcept |
Atomically sets the current value.