BloombergLP::bsls::AtomicOperations_DefaultInt

Default implementations of non-essential 32-bit integer atomic operations.

Synopsis

Declared in <bsls_atomicoperations_default.h>

template<class IMP>
struct AtomicOperations_DefaultInt;

Description

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.

Type Aliases

NameDescription
AtomicTypes This typedef is an alias to Atomic_TypeTraits<IMP>.

Static Member Functions

NameDescription
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 value from atomicInt and return the result.
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 swap atomicInt with acquire/release ordering.
testAndSwapIntAcqRel Conditionally swap atomicInt with acquire/release ordering.

Derived Classes

NameDescription
AtomicOperations_Default32 Default atomic operations for a generic 32-bit platform.
AtomicOperations_Default64 Default atomic operations for a generic 64-bit platform.