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

Synopsis

Declared in <bsls_atomicoperations_default.h>

template<class IMP>
struct AtomicOperations_DefaultInt;

Type Aliases

Name

Description

AtomicTypes

This typedef is an alias to Atomic_TypeTraits<IMP>.

Static Member Functions

Name

Description

addInt

Atomically add to the specified atomicInt the specified value, providing the sequential consistency memory ordering guarantee.

addIntAcqRel

Atomically add to the specified atomicInt the specified value, providing the acquire/release memory ordering guarantee.

addIntNvAcqRel

Atomically add to the specified atomicInt the specified value and return the resulting value, providing the acquire/release memory ordering guarantee.

addIntNvRelaxed

Atomically add to the specified atomicInt the specified value and return the resulting value, without providing any memory ordering guarantees.

addIntRelaxed

Atomically add to the specified atomicInt the specified value, without providing any memory ordering guarantees.

decrementInt

Atomically decrement the value of the specified atomicInt by 1, providing the sequential consistency memory ordering guarantee.

decrementIntAcqRel

Atomically decrement the value of the specified atomicInt by 1, providing the acquire/release memory ordering guarantee.

decrementIntNv

Atomically decrement the specified atomicInt by 1 and return the resulting value, providing the sequential consistency memory ordering guarantee.

decrementIntNvAcqRel

Atomically decrement the specified atomicInt by 1 and return the resulting value, providing the acquire/release memory ordering guarantee.

getIntAcquire

Atomically retrieve the value of the specified atomicInt, providing the acquire memory ordering guarantee.

getIntRelaxed

Atomically retrieve the value of the specified atomicInt, without providing any memory ordering guarantees.

incrementInt

Atomically increment the value of the specified atomicInt by 1, providing the sequential consistency memory ordering guarantee.

incrementIntAcqRel

Atomically increment the value of the specified atomicInt by 1, providing the acquire/release memory ordering guarantee.

incrementIntNv

Atomically increment the specified atomicInt by 1 and return the resulting value, providing the sequential consistency memory ordering guarantee.

incrementIntNvAcqRel

Atomically increment the specified atomicInt by 1 and return the resulting value, providing the acquire/release memory ordering guarantee.

initInt

Initialize the specified atomicInt and set its value to the optionally specified initialValue.

setIntRelaxed

Atomically set the value of the specified atomicInt to the specified value, without providing any memory ordering guarantees.

setIntRelease

Atomically set the value of the specified atomicInt to the specified value, providing the release memory ordering guarantee.

subtractIntNv

Atomically subtract from the specified atomicInt the specified value and return the resulting value, providing the sequential consistency memory ordering guarantee.

subtractIntNvAcqRel

Atomically subtract from the specified atomicInt the specified value and return the resulting value, providing the acquire/release memory ordering guarantee.

subtractIntNvRelaxed

Atomically subtract from the specified atomicInt the specified value and return the resulting value, without providing any memory ordering guarantees.

swapIntAcqRel

Atomically set the value of the specified atomicInt to the specified swapValue, and return its previous value, providing the acquire/release memory ordering guarantee.

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/release memory ordering guarantee. The whole operation is performed atomically.

Derived Classes

Name

Description

AtomicOperations_Default32

This class provides default implementations of non‐essential atomic operations for the 32‐bit integer, 64‐bit integer, the 32‐bit unsigned integer, 64‐bit unsigned integer and 32‐bit pointer type for a generic 32‐bit platform.

AtomicOperations_Default64

This class provides default implementations of non‐essential atomic operations for the 32‐bit integer, 64‐bit integer, the 32‐bit unsigned integer, 64‐bit unsigned integer and 64‐bit pointer type for a generic 64‐bit platform.

Created with MrDocs