Default implementations of non‐essential 64‐bit unsigned atomic operations.

Synopsis

Declared in <bsls_atomicoperations_default.h>

template<class IMP>
struct AtomicOperations_DefaultUint64;

Description

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

Note that AtomicOperations_DefaultUint64 is implemented in terms of the following atomic operations on the Int64 type that must be provided by the IMP template parameter. ` static Types::Int64 getInt64( typename AtomicTypes::Int64 const *atomicInt); static Types::Int64 getInt64Relaxed( typename AtomicTypes::Int64 const *atomicInt); static Types::Int64 getInt64Acquire( typename AtomicTypes::Int64 const *atomicInt); static void setInt64(typename AtomicTypes::Int64 *atomicInt, Types::Int64 value); static void setInt64Relaxed(typename AtomicTypes::Int64 *atomicInt, Types::Int64 value); static void setInt64Release(typename AtomicTypes::Int64 *atomicInt, Types::Int64 value); static Types::Int64 swapInt64(typename AtomicTypes::Int64 *atomicInt, Types::Int64 swapValue); static Types::Int64 swapInt64AcqRel( typename AtomicTypes::Int64 *atomicInt, Types::Int64 swapValue); static Types::Int64 testAndSwapInt64( typename AtomicTypes::Int64 *atomicInt, Types::Int64 compareValue, Types::Int64 swapValue); static Types::Int64 testAndSwapInt64AcqRel( typename AtomicTypes::Int64 *atomicInt, Types::Int64 compareValue, Types::Int64 swapValue); `

Type Aliases

Name

Description

AtomicTypes

This typedef is an alias to Atomic_TypeTraits<IMP>.

Static Member Functions

Name

Description

addUint64

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

addUint64AcqRel

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

addUint64Nv

Atomically add to the specified atomicUint the specified value and return the resulting value, providing the sequential consistency memory ordering guarantee.

addUint64NvAcqRel

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

addUint64NvRelaxed

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

addUint64Relaxed

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

decrementUint64

Atomically decrement the specified atomicUint by 1, providing the sequential consistency memory ordering guarantee.

decrementUint64AcqRel

Atomically decrement the specified atomicUint by 1, providing the acquire/release memory ordering guarantee.

decrementUint64Nv

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

decrementUint64NvAcqRel

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

getUint64

Atomically retrieve the value of the specified atomicUint, providing the sequential consistency memory ordering guarantee.

getUint64Acquire

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

getUint64Relaxed

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

incrementUint64

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

incrementUint64AcqRel

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

incrementUint64Nv

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

incrementUint64NvAcqRel

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

initUint64

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

setUint64

Atomically set the value of the specified atomicUint to the specified value, providing the sequential consistency memory ordering guarantee.

setUint64Relaxed

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

setUint64Release

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

subtractUint64Nv

Atomically subtract value from atomicUint and return the result.

subtractUint64NvAcqRel

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

subtractUint64NvRelaxed

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

swapUint64

Atomically swap atomicUint and return its previous value.

swapUint64AcqRel

Atomically swap atomicUint with acquire/release ordering.

testAndSwapUint64

Conditionally swap atomicUint if it equals compareValue.

testAndSwapUint64AcqRel

Conditionally swap atomicUint with acquire/release ordering.

Derived Classes

Name

Description

AtomicOperations_Default32

Default atomic operations for a generic 32‐bit platform.

AtomicOperations_Default64

Default atomic operations for a generic 64‐bit platform.

Created with MrDocs