[#BloombergLP-bsls-AtomicOperations_DefaultUint-0d7] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::AtomicOperations_DefaultUint :relfileprefix: ../../ :mrdocs: Default implementations of non‐essential 32‐bit unsigned atomic operations. == Synopsis Declared in `<bsls_atomicoperations_default.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class IMP> struct AtomicOperations_DefaultUint; ---- == Description This class provides default implementations of non‐essential atomic operations for the 32‐bit unsigned integer type independent on any specific platform. It also provides prototypes for the atomic operations for the 32‐bit unsigned integer type that have to be implemented separately for each specific platform. These platform‐independent and platform‐specific atomic operations together form a full set of atomic operations for the 32‐bit unsigned integer type. Note that `AtomicOperations_DefaultUint` is implemented in terms of the following atomic operations on the integer type that must be provided by the `IMP` template parameter. ` static int getInt(typename AtomicTypes::Int const *atomicInt); static int getIntRelaxed(typename AtomicTypes::Int const *atomicInt); static int getIntAcquire(typename AtomicTypes::Int const *atomicInt); static void setInt(typename AtomicTypes::Int *atomicInt, int value); static void setIntRelaxed(typename AtomicTypes::Int *atomicInt, int value); static void setIntRelease(typename AtomicTypes::Int *atomicInt, int value); static int swapInt(typename AtomicTypes::Int *atomicInt, int swapValue); static int swapIntAcqRel(typename AtomicTypes::Int *atomicInt, int swapValue); static int testAndSwapInt(typename AtomicTypes::Int *atomicInt, int compareValue, int swapValue); static int testAndSwapIntAcqRel(typename AtomicTypes::Int *atomicInt, int compareValue, int swapValue); ` == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/AtomicTypes.adoc[`AtomicTypes`] | This `typedef` is an alias to `Atomic_TypeTraits<IMP>`. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/addUint.adoc[`addUint`] | Atomically add to the specified `atomicUint` the specified `value`, providing the sequential consistency memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/addUintAcqRel.adoc[`addUintAcqRel`] | Atomically add to the specified `atomicUint` the specified `value`, providing the acquire/release memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/addUintNv.adoc[`addUintNv`] | Atomically add to the specified `atomicUint` the specified `value` and return the resulting value, providing the sequential consistency memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/addUintNvAcqRel.adoc[`addUintNvAcqRel`] | Atomically add to the specified `atomicUint` the specified `value` and return the resulting value, providing the acquire/release memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/addUintNvRelaxed.adoc[`addUintNvRelaxed`] | Atomically add to the specified `atomicUint` the specified `value` and return the resulting value, without providing any memory ordering guarantees. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/addUintRelaxed.adoc[`addUintRelaxed`] | Atomically add to the specified `atomicUint` the specified `value`, without providing any memory ordering guarantees. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/decrementUint.adoc[`decrementUint`] | Atomically decrement the value of the specified `atomicUint` by 1, providing the sequential consistency memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/decrementUintAcqRel.adoc[`decrementUintAcqRel`] | Atomically decrement the value of the specified `atomicUint` by 1, providing the acquire/release memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/decrementUintNv.adoc[`decrementUintNv`] | Atomically decrement the specified `atomicUint` by 1 and return the resulting value, providing the sequential consistency memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/decrementUintNvAcqRel.adoc[`decrementUintNvAcqRel`] | Atomically decrement the specified `atomicUint` by 1 and return the resulting value, providing the acquire/release memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/getUint.adoc[`getUint`] | Atomically retrieve the value of the specified `atomicUint`, providing the sequential consistency memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/getUintAcquire.adoc[`getUintAcquire`] | Atomically retrieve the value of the specified `atomicUint`, providing the acquire memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/getUintRelaxed.adoc[`getUintRelaxed`] | Atomically retrieve the value of the specified `atomicUint`, without providing any memory ordering guarantees. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/incrementUint.adoc[`incrementUint`] | Atomically increment the value of the specified `atomicUint` by 1, providing the sequential consistency memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/incrementUintAcqRel.adoc[`incrementUintAcqRel`] | Atomically increment the value of the specified `atomicUint` by 1, providing the acquire/release memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/incrementUintNv.adoc[`incrementUintNv`] | Atomically increment the specified `atomicUint` by 1 and return the resulting value, providing the sequential consistency memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/incrementUintNvAcqRel.adoc[`incrementUintNvAcqRel`] | Atomically increment the specified `atomicUint` by 1 and return the resulting value, providing the acquire/release memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/initUint.adoc[`initUint`] | Initialize the specified `atomicUint` and set its value to the optionally specified `initialValue`. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/setUint.adoc[`setUint`] | Atomically set the value of the specified `atomicUint` to the specified `value`, providing the sequential consistency memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/setUintRelaxed.adoc[`setUintRelaxed`] | Atomically set the value of the specified `atomicUint` to the specified `value`, without providing any memory ordering guarantees. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/setUintRelease.adoc[`setUintRelease`] | Atomically set the value of the specified `atomicUint` to the specified `value`, providing the release memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/subtractUintNv.adoc[`subtractUintNv`] | Atomically subtract `value` from `atomicUint` and return the result. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/subtractUintNvAcqRel.adoc[`subtractUintNvAcqRel`] | Atomically subtract from the specified `atomicUint` the specified `value` and return the resulting value, providing the acquire/release memory ordering guarantee. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/subtractUintNvRelaxed.adoc[`subtractUintNvRelaxed`] | Atomically subtract from the specified `atomicUint` the specified `value` and return the resulting value, without providing any memory ordering guarantees. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/swapUint.adoc[`swapUint`] | Atomically swap `atomicUint` and return its previous value. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/swapUintAcqRel.adoc[`swapUintAcqRel`] | Atomically swap `atomicUint` with acquire/release ordering. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/testAndSwapUint.adoc[`testAndSwapUint`] | Conditionally swap `atomicUint` if it equals `compareValue`. | xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/testAndSwapUintAcqRel.adoc[`testAndSwapUintAcqRel`] | Conditionally swap `atomicUint` with acquire/release ordering. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsls/AtomicOperations_Default32.adoc[`AtomicOperations_Default32`] | Default atomic operations for a generic 32‐bit platform. | xref:BloombergLP/bsls/AtomicOperations_Default64-0b.adoc[`AtomicOperations_Default64`] | Default atomic operations for a generic 64‐bit platform. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#