BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsls::AtomicOperations_DefaultUint< IMP > Struct Template Reference

#include <bsls_atomicoperations_default.h>

Inheritance diagram for bsls::AtomicOperations_DefaultUint< IMP >:
bsls::AtomicOperations_Default32< IMP > bsls::AtomicOperations_Default64< IMP >

Public Types

typedef Atomic_TypeTraits< IMP > AtomicTypes
 

Static Public Member Functions

static unsigned int getUint (typename AtomicTypes::Uint const *atomicUint)
 
static unsigned int getUintAcquire (typename AtomicTypes::Uint const *atomicUint)
 
static unsigned int getUintRelaxed (typename AtomicTypes::Uint const *atomicUint)
 
static void initUint (typename AtomicTypes::Uint *atomicUint, unsigned int initialValue=0)
 
static void setUint (typename AtomicTypes::Uint *atomicUint, unsigned int value)
 
static void setUintRelaxed (typename AtomicTypes::Uint *atomicUint, unsigned int value)
 
static void setUintRelease (typename AtomicTypes::Uint *atomicUint, unsigned int value)
 
static unsigned int swapUint (typename AtomicTypes::Uint *atomicUint, unsigned int swapValue)
 
static unsigned int swapUintAcqRel (typename AtomicTypes::Uint *atomicUint, unsigned int swapValue)
 
static unsigned int testAndSwapUint (typename AtomicTypes::Uint *atomicUint, unsigned int compareValue, unsigned int swapValue)
 
static unsigned int testAndSwapUintAcqRel (typename AtomicTypes::Uint *atomicUint, unsigned int compareValue, unsigned int swapValue)
 
static void addUint (typename AtomicTypes::Uint *atomicUint, unsigned int value)
 
static void addUintAcqRel (typename AtomicTypes::Uint *atomicUint, unsigned int value)
 
static void addUintRelaxed (typename AtomicTypes::Uint *atomicUint, unsigned int value)
 
static unsigned int addUintNv (typename AtomicTypes::Uint *atomicUint, unsigned int value)
 
static unsigned int addUintNvAcqRel (typename AtomicTypes::Uint *atomicUint, unsigned int value)
 
static unsigned int addUintNvRelaxed (typename AtomicTypes::Uint *atomicUint, unsigned int value)
 
static void decrementUint (typename AtomicTypes::Uint *atomicUint)
 
static void decrementUintAcqRel (typename AtomicTypes::Uint *atomicUint)
 
static unsigned int decrementUintNv (typename AtomicTypes::Uint *atomicUint)
 
static unsigned int decrementUintNvAcqRel (typename AtomicTypes::Uint *atomicUint)
 
static void incrementUint (typename AtomicTypes::Uint *atomicUint)
 
static void incrementUintAcqRel (typename AtomicTypes::Uint *atomicUint)
 
static unsigned int incrementUintNv (typename AtomicTypes::Uint *atomicUint)
 
static unsigned int incrementUintNvAcqRel (typename AtomicTypes::Uint *atomicUint)
 
static unsigned int subtractUintNv (typename AtomicTypes::Uint *atomicUint, unsigned int value)
 
static unsigned int subtractUintNvAcqRel (typename AtomicTypes::Uint *atomicUint, unsigned int value)
 
static unsigned int subtractUintNvRelaxed (typename AtomicTypes::Uint *atomicUint, unsigned int value)
 

Detailed Description

template<class IMP>
struct bsls::AtomicOperations_DefaultUint< IMP >

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

Note that AtomicOperations_DefaultUint is implemented in terms of the following atomic operations on the integer type that must be provided by the IMP template parameter.

static int getInt(typename AtomicTypes::Int const *atomicInt);
static int getIntRelaxed(typename AtomicTypes::Int const *atomicInt);
static int getIntAcquire(typename AtomicTypes::Int const *atomicInt);
static void setInt(typename AtomicTypes::Int *atomicInt, int value);
static void setIntRelaxed(typename AtomicTypes::Int *atomicInt,
int value);
static void setIntRelease(typename AtomicTypes::Int *atomicInt,
int value);
static int swapInt(typename AtomicTypes::Int *atomicInt,
int swapValue);
static int swapIntAcqRel(typename AtomicTypes::Int *atomicInt,
int swapValue);
static int testAndSwapInt(typename AtomicTypes::Int *atomicInt,
int compareValue,
int swapValue);
static int testAndSwapIntAcqRel(typename AtomicTypes::Int *atomicInt,
int compareValue,
int swapValue);

Member Typedef Documentation

◆ AtomicTypes

template<class IMP >
typedef Atomic_TypeTraits<IMP> bsls::AtomicOperations_DefaultUint< IMP >::AtomicTypes

Member Function Documentation

◆ addUint()

template<class IMP >
void bsls::AtomicOperations_DefaultUint< IMP >::addUint ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  value 
)
inlinestatic

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

◆ addUintAcqRel()

template<class IMP >
void bsls::AtomicOperations_DefaultUint< IMP >::addUintAcqRel ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  value 
)
inlinestatic

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

◆ addUintNv()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::addUintNv ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  value 
)
inlinestatic

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

◆ addUintNvAcqRel()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::addUintNvAcqRel ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  value 
)
inlinestatic

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

◆ addUintNvRelaxed()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::addUintNvRelaxed ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  value 
)
inlinestatic

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

◆ addUintRelaxed()

template<class IMP >
void bsls::AtomicOperations_DefaultUint< IMP >::addUintRelaxed ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  value 
)
inlinestatic

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

◆ decrementUint()

template<class IMP >
void bsls::AtomicOperations_DefaultUint< IMP >::decrementUint ( typename AtomicTypes::Uint *  atomicUint)
inlinestatic

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

◆ decrementUintAcqRel()

template<class IMP >
void bsls::AtomicOperations_DefaultUint< IMP >::decrementUintAcqRel ( typename AtomicTypes::Uint *  atomicUint)
inlinestatic

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

◆ decrementUintNv()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::decrementUintNv ( typename AtomicTypes::Uint *  atomicUint)
inlinestatic

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

◆ decrementUintNvAcqRel()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::decrementUintNvAcqRel ( typename AtomicTypes::Uint *  atomicUint)
inlinestatic

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

◆ getUint()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::getUint ( typename AtomicTypes::Uint const *  atomicUint)
inlinestatic

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

◆ getUintAcquire()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::getUintAcquire ( typename AtomicTypes::Uint const *  atomicUint)
inlinestatic

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

◆ getUintRelaxed()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::getUintRelaxed ( typename AtomicTypes::Uint const *  atomicUint)
inlinestatic

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

◆ incrementUint()

template<class IMP >
void bsls::AtomicOperations_DefaultUint< IMP >::incrementUint ( typename AtomicTypes::Uint *  atomicUint)
inlinestatic

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

◆ incrementUintAcqRel()

template<class IMP >
void bsls::AtomicOperations_DefaultUint< IMP >::incrementUintAcqRel ( typename AtomicTypes::Uint *  atomicUint)
inlinestatic

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

◆ incrementUintNv()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::incrementUintNv ( typename AtomicTypes::Uint *  atomicUint)
inlinestatic

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

◆ incrementUintNvAcqRel()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::incrementUintNvAcqRel ( typename AtomicTypes::Uint *  atomicUint)
inlinestatic

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

◆ initUint()

template<class IMP >
void bsls::AtomicOperations_DefaultUint< IMP >::initUint ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  initialValue = 0 
)
inlinestatic

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

◆ setUint()

template<class IMP >
void bsls::AtomicOperations_DefaultUint< IMP >::setUint ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  value 
)
inlinestatic

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

◆ setUintRelaxed()

template<class IMP >
void bsls::AtomicOperations_DefaultUint< IMP >::setUintRelaxed ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  value 
)
inlinestatic

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

◆ setUintRelease()

template<class IMP >
void bsls::AtomicOperations_DefaultUint< IMP >::setUintRelease ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  value 
)
inlinestatic

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

◆ subtractUintNv()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::subtractUintNv ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  value 
)
inlinestatic

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

◆ subtractUintNvAcqRel()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::subtractUintNvAcqRel ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  value 
)
inlinestatic

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

◆ subtractUintNvRelaxed()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::subtractUintNvRelaxed ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  value 
)
inlinestatic

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

◆ swapUint()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::swapUint ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  swapValue 
)
inlinestatic

Atomically set the value of the specified atomicUint to the specified swapValue, and return its previous value, providing the sequential consistency memory ordering guarantee.

◆ swapUintAcqRel()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::swapUintAcqRel ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  swapValue 
)
inlinestatic

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

◆ testAndSwapUint()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::testAndSwapUint ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  compareValue,
unsigned int  swapValue 
)
inlinestatic

Conditionally set the value of the specified atomicUint to the specified swapValue if and only if the value of atomicUint equals the value of the specified compareValue, and return the initial value of atomicUint, providing the sequential consistency memory ordering guarantee. The whole operation is performed atomically.

◆ testAndSwapUintAcqRel()

template<class IMP >
unsigned int bsls::AtomicOperations_DefaultUint< IMP >::testAndSwapUintAcqRel ( typename AtomicTypes::Uint *  atomicUint,
unsigned int  compareValue,
unsigned int  swapValue 
)
inlinestatic

Conditionally set the value of the specified atomicUint 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 atomicUint, providing the acquire/release memory ordering guarantee. The whole operation is performed atomically.


The documentation for this struct was generated from the following file: