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

#include <bsls_atomicoperations_default.h>

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

Public Types

typedef Atomic_TypeTraits< IMP > AtomicTypes
 

Static Public Member Functions

static int getIntAcquire (typename AtomicTypes::Int const *atomicInt)
 
static int getIntRelaxed (typename AtomicTypes::Int const *atomicInt)
 
static void initInt (typename AtomicTypes::Int *atomicInt, int initialValue=0)
 
static void setIntRelaxed (typename AtomicTypes::Int *atomicInt, int value)
 
static void setIntRelease (typename AtomicTypes::Int *atomicInt, int value)
 
static int swapIntAcqRel (typename AtomicTypes::Int *atomicInt, int swapValue)
 
static int testAndSwapIntAcqRel (typename AtomicTypes::Int *atomicInt, int compareValue, int swapValue)
 
static void addInt (typename AtomicTypes::Int *atomicInt, int value)
 
static void addIntAcqRel (typename AtomicTypes::Int *atomicInt, int value)
 
static void addIntRelaxed (typename AtomicTypes::Int *atomicInt, int value)
 
static int addIntNvAcqRel (typename AtomicTypes::Int *atomicInt, int value)
 
static int addIntNvRelaxed (typename AtomicTypes::Int *atomicInt, int value)
 
static void decrementInt (typename AtomicTypes::Int *atomicInt)
 
static void decrementIntAcqRel (typename AtomicTypes::Int *atomicInt)
 
static int decrementIntNv (typename AtomicTypes::Int *atomicInt)
 
static int decrementIntNvAcqRel (typename AtomicTypes::Int *atomicInt)
 
static void incrementInt (typename AtomicTypes::Int *atomicInt)
 
static void incrementIntAcqRel (typename AtomicTypes::Int *atomicInt)
 
static int incrementIntNv (typename AtomicTypes::Int *atomicInt)
 
static int incrementIntNvAcqRel (typename AtomicTypes::Int *atomicInt)
 
static int subtractIntNv (typename AtomicTypes::Int *atomicInt, int value)
 
static int subtractIntNvAcqRel (typename AtomicTypes::Int *atomicInt, int value)
 
static int subtractIntNvRelaxed (typename AtomicTypes::Int *atomicInt, int value)
 

Detailed Description

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

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.

Member Typedef Documentation

◆ AtomicTypes

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

Member Function Documentation

◆ addInt()

template<class IMP >
void bsls::AtomicOperations_DefaultInt< IMP >::addInt ( typename AtomicTypes::Int *  atomicInt,
int  value 
)
inlinestatic

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

◆ addIntAcqRel()

template<class IMP >
void bsls::AtomicOperations_DefaultInt< IMP >::addIntAcqRel ( typename AtomicTypes::Int *  atomicInt,
int  value 
)
inlinestatic

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

◆ addIntNvAcqRel()

template<class IMP >
int bsls::AtomicOperations_DefaultInt< IMP >::addIntNvAcqRel ( typename AtomicTypes::Int *  atomicInt,
int  value 
)
inlinestatic

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

◆ addIntNvRelaxed()

template<class IMP >
int bsls::AtomicOperations_DefaultInt< IMP >::addIntNvRelaxed ( typename AtomicTypes::Int *  atomicInt,
int  value 
)
inlinestatic

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

◆ addIntRelaxed()

template<class IMP >
void bsls::AtomicOperations_DefaultInt< IMP >::addIntRelaxed ( typename AtomicTypes::Int *  atomicInt,
int  value 
)
inlinestatic

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

◆ decrementInt()

template<class IMP >
void bsls::AtomicOperations_DefaultInt< IMP >::decrementInt ( typename AtomicTypes::Int *  atomicInt)
inlinestatic

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

◆ decrementIntAcqRel()

template<class IMP >
void bsls::AtomicOperations_DefaultInt< IMP >::decrementIntAcqRel ( typename AtomicTypes::Int *  atomicInt)
inlinestatic

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

◆ decrementIntNv()

template<class IMP >
int bsls::AtomicOperations_DefaultInt< IMP >::decrementIntNv ( typename AtomicTypes::Int *  atomicInt)
inlinestatic

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

◆ decrementIntNvAcqRel()

template<class IMP >
int bsls::AtomicOperations_DefaultInt< IMP >::decrementIntNvAcqRel ( typename AtomicTypes::Int *  atomicInt)
inlinestatic

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

◆ getIntAcquire()

template<class IMP >
int bsls::AtomicOperations_DefaultInt< IMP >::getIntAcquire ( typename AtomicTypes::Int const *  atomicInt)
inlinestatic

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

◆ getIntRelaxed()

template<class IMP >
int bsls::AtomicOperations_DefaultInt< IMP >::getIntRelaxed ( typename AtomicTypes::Int const *  atomicInt)
inlinestatic

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

◆ incrementInt()

template<class IMP >
void bsls::AtomicOperations_DefaultInt< IMP >::incrementInt ( typename AtomicTypes::Int *  atomicInt)
inlinestatic

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

◆ incrementIntAcqRel()

template<class IMP >
void bsls::AtomicOperations_DefaultInt< IMP >::incrementIntAcqRel ( typename AtomicTypes::Int *  atomicInt)
inlinestatic

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

◆ incrementIntNv()

template<class IMP >
int bsls::AtomicOperations_DefaultInt< IMP >::incrementIntNv ( typename AtomicTypes::Int *  atomicInt)
inlinestatic

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

◆ incrementIntNvAcqRel()

template<class IMP >
int bsls::AtomicOperations_DefaultInt< IMP >::incrementIntNvAcqRel ( typename AtomicTypes::Int *  atomicInt)
inlinestatic

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

◆ initInt()

template<class IMP >
void bsls::AtomicOperations_DefaultInt< IMP >::initInt ( typename AtomicTypes::Int *  atomicInt,
int  initialValue = 0 
)
inlinestatic

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

◆ setIntRelaxed()

template<class IMP >
void bsls::AtomicOperations_DefaultInt< IMP >::setIntRelaxed ( typename AtomicTypes::Int *  atomicInt,
int  value 
)
inlinestatic

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

◆ setIntRelease()

template<class IMP >
void bsls::AtomicOperations_DefaultInt< IMP >::setIntRelease ( typename AtomicTypes::Int *  atomicInt,
int  value 
)
inlinestatic

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

◆ subtractIntNv()

template<class IMP >
int bsls::AtomicOperations_DefaultInt< IMP >::subtractIntNv ( typename AtomicTypes::Int *  atomicInt,
int  value 
)
inlinestatic

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

◆ subtractIntNvAcqRel()

template<class IMP >
int bsls::AtomicOperations_DefaultInt< IMP >::subtractIntNvAcqRel ( typename AtomicTypes::Int *  atomicInt,
int  value 
)
inlinestatic

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

◆ subtractIntNvRelaxed()

template<class IMP >
int bsls::AtomicOperations_DefaultInt< IMP >::subtractIntNvRelaxed ( typename AtomicTypes::Int *  atomicInt,
int  value 
)
inlinestatic

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

◆ swapIntAcqRel()

template<class IMP >
int bsls::AtomicOperations_DefaultInt< IMP >::swapIntAcqRel ( typename AtomicTypes::Int *  atomicInt,
int  swapValue 
)
inlinestatic

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()

template<class IMP >
int bsls::AtomicOperations_DefaultInt< IMP >::testAndSwapIntAcqRel ( typename AtomicTypes::Int *  atomicInt,
int  compareValue,
int  swapValue 
)
inlinestatic

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.


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