[#BloombergLP-bsls-AtomicOperations_DefaultInt-08]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::AtomicOperations&lowbar;DefaultInt
:relfileprefix: ../../
:mrdocs:

This class provides default implementations of non&hyphen;essential atomic operations for the 32&hyphen;bit integer type independent on any specific platform&period; It also provides prototypes for the atomic operations for the 32&hyphen;bit 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 integer type&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;DefaultInt;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/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_DefaultInt-08/addInt.adoc[`addInt`] 
| Atomically add to the specified `atomicInt` the specified `value`, providing the sequential consistency memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/addIntAcqRel.adoc[`addIntAcqRel`] 
| Atomically add to the specified `atomicInt` the specified `value`, providing the acquire&sol;release memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/addIntNvAcqRel.adoc[`addIntNvAcqRel`] 
| Atomically add to the specified `atomicInt` the specified `value` and return the resulting value, providing the acquire&sol;release memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/addIntNvRelaxed.adoc[`addIntNvRelaxed`] 
| Atomically add to the specified `atomicInt` the specified `value` and return the resulting value, without providing any memory ordering guarantees&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/addIntRelaxed.adoc[`addIntRelaxed`] 
| Atomically add to the specified `atomicInt` the specified `value`, without providing any memory ordering guarantees&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/decrementInt.adoc[`decrementInt`] 
| Atomically decrement the value of the specified `atomicInt` by 1, providing the sequential consistency memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/decrementIntAcqRel.adoc[`decrementIntAcqRel`] 
| Atomically decrement the value of the specified `atomicInt` by 1, providing the acquire&sol;release memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/decrementIntNv.adoc[`decrementIntNv`] 
| Atomically decrement the specified `atomicInt` by 1 and return the resulting value, providing the sequential consistency memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/decrementIntNvAcqRel.adoc[`decrementIntNvAcqRel`] 
| Atomically decrement the specified `atomicInt` by 1 and return the resulting value, providing the acquire&sol;release memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/getIntAcquire.adoc[`getIntAcquire`] 
| Atomically retrieve the value of the specified `atomicInt`, providing the acquire memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/getIntRelaxed.adoc[`getIntRelaxed`] 
| Atomically retrieve the value of the specified `atomicInt`, without providing any memory ordering guarantees&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/incrementInt.adoc[`incrementInt`] 
| Atomically increment the value of the specified `atomicInt` by 1, providing the sequential consistency memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/incrementIntAcqRel.adoc[`incrementIntAcqRel`] 
| Atomically increment the value of the specified `atomicInt` by 1, providing the acquire&sol;release memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/incrementIntNv.adoc[`incrementIntNv`] 
| Atomically increment the specified `atomicInt` by 1 and return the resulting value, providing the sequential consistency memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/incrementIntNvAcqRel.adoc[`incrementIntNvAcqRel`] 
| Atomically increment the specified `atomicInt` by 1 and return the resulting value, providing the acquire&sol;release memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/initInt.adoc[`initInt`] 
| Initialize the specified `atomicInt` and set its value to the optionally specified `initialValue`&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/setIntRelaxed.adoc[`setIntRelaxed`] 
| Atomically set the value of the specified `atomicInt` to the specified `value`, without providing any memory ordering guarantees&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/setIntRelease.adoc[`setIntRelease`] 
| Atomically set the value of the specified `atomicInt` to the specified `value`, providing the release memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/subtractIntNv.adoc[`subtractIntNv`] 
| Atomically subtract from the specified `atomicInt` the specified `value` and return the resulting value, providing the sequential consistency memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/subtractIntNvAcqRel.adoc[`subtractIntNvAcqRel`] 
| Atomically subtract from the specified `atomicInt` the specified `value` and return the resulting value, providing the acquire&sol;release memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/subtractIntNvRelaxed.adoc[`subtractIntNvRelaxed`] 
| Atomically subtract from the specified `atomicInt` the specified `value` and return the resulting value, without providing any memory ordering guarantees&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/swapIntAcqRel.adoc[`swapIntAcqRel`] 
| Atomically set the value of the specified `atomicInt` to the specified `swapValue`, and return its previous value, providing the acquire&sol;release memory ordering guarantee&period;
| xref:BloombergLP/bsls/AtomicOperations_DefaultInt-08/testAndSwapIntAcqRel.adoc[`testAndSwapIntAcqRel`] 
| Conditionally set the value of the specified `atomicInt` to the specified `swapValue` if and only if the value of `atomicInt` equals the value of the specified `compareValue`, and return the initial value of `atomicInt`, providing the acquire&sol;release memory ordering guarantee&period; The whole operation is performed atomically&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bsls/AtomicOperations_Default32.adoc[`AtomicOperations&lowbar;Default32`] 
| This class provides default implementations of non&hyphen;essential atomic operations for the 32&hyphen;bit integer, 64&hyphen;bit integer, the 32&hyphen;bit unsigned integer, 64&hyphen;bit unsigned integer and 32&hyphen;bit pointer type for a generic 32&hyphen;bit platform&period;
| xref:BloombergLP/bsls/AtomicOperations_Default64-0b.adoc[`AtomicOperations&lowbar;Default64`] 
| This class provides default implementations of non&hyphen;essential atomic operations for the 32&hyphen;bit integer, 64&hyphen;bit integer, the 32&hyphen;bit unsigned integer, 64&hyphen;bit unsigned integer and 64&hyphen;bit pointer type for a generic 64&hyphen;bit platform&period;
|===


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