[#BloombergLP-bsls-AtomicUint] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::AtomicUint :relfileprefix: ../../ :mrdocs: This class implements an atomic unsigned integer, which supports common unsigned integer operations in a way that is guaranteed to be atomic. Operations on objects of this class provide the sequential consistency memory ordering guarantee unless explicitly qualified with a less strict consistency guarantee suffix (i.e., Acquire, Release, AcqRel or Relaxed). == Synopsis Declared in `<bsls_atomic.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class AtomicUint; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsls/AtomicUint/2constructor-06.adoc[`AtomicUint`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bsls/AtomicUint/operator_assign.adoc[`operator=`] | Atomically assign the specified `value` to this object, and return a reference offering modifiable access to `this` object. | xref:BloombergLP/bsls/AtomicUint/add.adoc[`add`] | Atomically add the specified `value` to this object and return the resulting value. | xref:BloombergLP/bsls/AtomicUint/addAcqRel.adoc[`addAcqRel`] | Atomically add the specified `value` to this object and return the resulting value, providing the acquire/release memory ordering guarantee. | xref:BloombergLP/bsls/AtomicUint/addRelaxed.adoc[`addRelaxed`] | Atomically add the specified `value` to this object and return the resulting value, providing the relaxed memory ordering guarantee. | xref:BloombergLP/bsls/AtomicUint/load.adoc[`load`] | Return the current value of this object. | xref:BloombergLP/bsls/AtomicUint/loadAcquire.adoc[`loadAcquire`] | Return the current value of this object, providing the acquire memory ordering guarantee. | xref:BloombergLP/bsls/AtomicUint/loadRelaxed.adoc[`loadRelaxed`] | Return the current value of this object, providing the relaxed memory ordering guarantee. | xref:BloombergLP/bsls/AtomicUint/operator_inc-05.adoc[`operator++`] | Increment operators | xref:BloombergLP/bsls/AtomicUint/operator_plus_eq.adoc[`operator+=`] | Atomically add the specified `value` to this object, and return the resulting value. | xref:BloombergLP/bsls/AtomicUint/operator_dec-05.adoc[`operator‐‐`] | Decrement operators | xref:BloombergLP/bsls/AtomicUint/operator_minus_eq.adoc[`operator‐=`] | Atomically subtract the specified `value` from this object, and return the resulting value. | xref:BloombergLP/bsls/AtomicUint/store.adoc[`store`] | Atomically assign the specified `value` to this object, providing the sequential consistency memory ordering guarantee. | xref:BloombergLP/bsls/AtomicUint/storeRelaxed.adoc[`storeRelaxed`] | Atomically assign the specified `value` to this object, providing the relaxed memory ordering guarantee. | xref:BloombergLP/bsls/AtomicUint/storeRelease.adoc[`storeRelease`] | Atomically assign the specified `value` to this object, providing the release memory ordering guarantee. | xref:BloombergLP/bsls/AtomicUint/subtract.adoc[`subtract`] | Atomically subtract the specified `value` from this object and return the resulting value. | xref:BloombergLP/bsls/AtomicUint/subtractAcqRel.adoc[`subtractAcqRel`] | Atomically subtract the specified `value` from this object and return the resulting value, providing the acquire/release memory ordering guarantee. | xref:BloombergLP/bsls/AtomicUint/subtractRelaxed.adoc[`subtractRelaxed`] | Atomically subtract the specified `value` from this object and return the resulting value, providing the relaxed memory ordering guarantee. | xref:BloombergLP/bsls/AtomicUint/swap.adoc[`swap`] | Atomically set the value of this object to the specified `swapValue` and return its previous value. | xref:BloombergLP/bsls/AtomicUint/swapAcqRel.adoc[`swapAcqRel`] | Atomically set the value of this object to the specified `swapValue` and return its previous value, providing the acquire/release memory ordering guarantee. | xref:BloombergLP/bsls/AtomicUint/testAndSwap.adoc[`testAndSwap`] | Compare the value of this object to the specified `compareValue`. If they are equal, set the value of this atomic unsigned integer to the specified `swapValue`, otherwise leave this value unchanged. Return the previous value of this atomic unsigned integer, whether or not the swap occurred. Note that the entire test‐and‐swap operation is performed atomically. | xref:BloombergLP/bsls/AtomicUint/testAndSwapAcqRel.adoc[`testAndSwapAcqRel`] | Compare the value of this object to the specified `compareValue`. If they are equal, set the value of this atomic unsigned integer to the specified `swapValue`, otherwise leave this value unchanged. Return the previous value of this atomic unsigned integer, whether or not the swap occurred. Note that the entire test‐and‐swap operation is performed atomically and it provides the acquire/release memory ordering guarantee. | xref:BloombergLP/bsls/AtomicUint/2conversion.adoc[`operator unsigned int`] | Return the current value of this object. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#