[#BloombergLP-bsls-AtomicOperations_DefaultUint-0d7]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::AtomicOperations&lowbar;DefaultUint
:relfileprefix: ../../
:mrdocs:

Default implementations of non&hyphen;essential 32&hyphen;bit unsigned atomic operations&period;

== Synopsis

Declared in `&lt;bsls&lowbar;atomicoperations&lowbar;default&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class IMP&gt;
struct AtomicOperations&lowbar;DefaultUint;
----

== Description

This class provides default implementations of non&hyphen;essential atomic operations for the 32&hyphen;bit unsigned integer type independent on any specific platform&period; It also provides prototypes for the atomic operations for the 32&hyphen;bit unsigned integer type that have to be implemented separately for each specific platform&period; These platform&hyphen;independent and platform&hyphen;specific atomic operations together form a full set of atomic operations for the 32&hyphen;bit unsigned integer type&period;

Note that `AtomicOperations&lowbar;DefaultUint` is implemented in terms of the following atomic operations on the integer type that must be provided by the `IMP` template parameter&period; &grave; static int getInt(typename AtomicTypes&colon;&colon;Int const &ast;atomicInt)&semi; static int getIntRelaxed(typename AtomicTypes&colon;&colon;Int const &ast;atomicInt)&semi; static int getIntAcquire(typename AtomicTypes&colon;&colon;Int const &ast;atomicInt)&semi; static void setInt(typename AtomicTypes&colon;&colon;Int &ast;atomicInt, int value)&semi; static void setIntRelaxed(typename AtomicTypes&colon;&colon;Int &ast;atomicInt, int value)&semi; static void setIntRelease(typename AtomicTypes&colon;&colon;Int &ast;atomicInt, int value)&semi; static int swapInt(typename AtomicTypes&colon;&colon;Int &ast;atomicInt, int swapValue)&semi; static int swapIntAcqRel(typename AtomicTypes&colon;&colon;Int &ast;atomicInt, int swapValue)&semi; static int testAndSwapInt(typename AtomicTypes&colon;&colon;Int &ast;atomicInt, int compareValue, int swapValue)&semi; static int testAndSwapIntAcqRel(typename AtomicTypes&colon;&colon;Int &ast;atomicInt, int compareValue, int swapValue)&semi; &grave;

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/AtomicTypes.adoc[`AtomicTypes`] 
| This `typedef` is an alias to `Atomic&lowbar;TypeTraits&lt;IMP&gt;`&period;
|===


== 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&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/addUintAcqRel.adoc[`addUintAcqRel`] 
| Atomically add to the specified `atomicUint` the specified `value`, providing the acquire&sol;release memory ordering guarantee&period;
| 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&period;
| 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&sol;release memory ordering guarantee&period;
| 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&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/addUintRelaxed.adoc[`addUintRelaxed`] 
| Atomically add to the specified `atomicUint` the specified `value`, without providing any memory ordering guarantees&period;
| 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&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/decrementUintAcqRel.adoc[`decrementUintAcqRel`] 
| Atomically decrement the value of the specified `atomicUint` by 1, providing the acquire&sol;release memory ordering guarantee&period;
| 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&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/decrementUintNvAcqRel.adoc[`decrementUintNvAcqRel`] 
| Atomically decrement the specified `atomicUint` by 1 and return the resulting value, providing the acquire&sol;release memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/getUint.adoc[`getUint`] 
| Atomically retrieve the value of the specified `atomicUint`, providing the sequential consistency memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/getUintAcquire.adoc[`getUintAcquire`] 
| Atomically retrieve the value of the specified `atomicUint`, providing the acquire memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/getUintRelaxed.adoc[`getUintRelaxed`] 
| Atomically retrieve the value of the specified `atomicUint`, without providing any memory ordering guarantees&period;
| 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&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/incrementUintAcqRel.adoc[`incrementUintAcqRel`] 
| Atomically increment the value of the specified `atomicUint` by 1, providing the acquire&sol;release memory ordering guarantee&period;
| 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&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/incrementUintNvAcqRel.adoc[`incrementUintNvAcqRel`] 
| Atomically increment the specified `atomicUint` by 1 and return the resulting value, providing the acquire&sol;release memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/initUint.adoc[`initUint`] 
| Initialize the specified `atomicUint` and set its value to the optionally specified `initialValue`&period;
| 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&period;
| 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&period;
| 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&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/subtractUintNv.adoc[`subtractUintNv`] 
| Atomically subtract `value` from `atomicUint` and return the result&period;
| 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&sol;release memory ordering guarantee&period;
| 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&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/swapUint.adoc[`swapUint`] 
| Atomically swap `atomicUint` and return its previous value&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/swapUintAcqRel.adoc[`swapUintAcqRel`] 
| Atomically swap `atomicUint` with acquire&sol;release ordering&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/testAndSwapUint.adoc[`testAndSwapUint`] 
| Conditionally swap `atomicUint` if it equals `compareValue`&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultUint-0d7/testAndSwapUintAcqRel.adoc[`testAndSwapUintAcqRel`] 
| Conditionally swap `atomicUint` with acquire&sol;release ordering&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsls/AtomicOperations_Default32.adoc[`AtomicOperations&lowbar;Default32`] 
| Default atomic operations for a generic 32&hyphen;bit platform&period;
| xref:BloombergLP/bsls/AtomicOperations_Default64-0b.adoc[`AtomicOperations&lowbar;Default64`] 
| Default atomic operations for a generic 64&hyphen;bit platform&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
