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

#include <bsls_atomicoperations_default.h>

Inheritance diagram for bsls::AtomicOperations_DefaultPointer64< IMP >:
bsls::AtomicOperations_Default64< IMP >

Public Types

typedef Atomic_TypeTraits< IMP > AtomicTypes
 

Static Public Member Functions

static void * getPtr (typename AtomicTypes::Pointer const *atomicPtr)
 
static void * getPtrAcquire (typename AtomicTypes::Pointer const *atomicPtr)
 
static void * getPtrRelaxed (typename AtomicTypes::Pointer const *atomicPtr)
 
static void initPointer (typename AtomicTypes::Pointer *atomicPtr, void *initialValue=0)
 
static void setPtr (typename AtomicTypes::Pointer *atomicPtr, void *value)
 
static void setPtrRelaxed (typename AtomicTypes::Pointer *atomicPtr, void *value)
 
static void setPtrRelease (typename AtomicTypes::Pointer *atomicPtr, void *value)
 
static void * swapPtr (typename AtomicTypes::Pointer *atomicPtr, void *swapValue)
 
static void * swapPtrAcqRel (typename AtomicTypes::Pointer *atomicPtr, void *swapValue)
 
static void * testAndSwapPtr (typename AtomicTypes::Pointer *atomicPtr, void *compareValue, void *swapValue)
 
static void * testAndSwapPtrAcqRel (typename AtomicTypes::Pointer *atomicPtr, void *compareValue, void *swapValue)
 

Detailed Description

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

This class provides default implementations of non-essential atomic operations for the 64-bit pointer type independent on any specific platform. It also provides prototypes for the atomic operations for the pointer type that have to be implemented separately for each specific platform. These platform-independent and platform-specific atomic operations combined together form a full set of atomic operations for the pointer type.

Note that AtomicOperations_DefaultPointer64 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);
long long Int64
Definition bsls_types.h:132

Member Typedef Documentation

◆ AtomicTypes

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

Member Function Documentation

◆ getPtr()

template<class IMP >
void * bsls::AtomicOperations_DefaultPointer64< IMP >::getPtr ( typename AtomicTypes::Pointer const *  atomicPtr)
inlinestatic

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

◆ getPtrAcquire()

template<class IMP >
void * bsls::AtomicOperations_DefaultPointer64< IMP >::getPtrAcquire ( typename AtomicTypes::Pointer const *  atomicPtr)
inlinestatic

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

◆ getPtrRelaxed()

template<class IMP >
void * bsls::AtomicOperations_DefaultPointer64< IMP >::getPtrRelaxed ( typename AtomicTypes::Pointer const *  atomicPtr)
inlinestatic

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

◆ initPointer()

template<class IMP >
void bsls::AtomicOperations_DefaultPointer64< IMP >::initPointer ( typename AtomicTypes::Pointer *  atomicPtr,
void *  initialValue = 0 
)
inlinestatic

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

◆ setPtr()

template<class IMP >
void bsls::AtomicOperations_DefaultPointer64< IMP >::setPtr ( typename AtomicTypes::Pointer *  atomicPtr,
void *  value 
)
inlinestatic

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

◆ setPtrRelaxed()

template<class IMP >
void bsls::AtomicOperations_DefaultPointer64< IMP >::setPtrRelaxed ( typename AtomicTypes::Pointer *  atomicPtr,
void *  value 
)
inlinestatic

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

◆ setPtrRelease()

template<class IMP >
void bsls::AtomicOperations_DefaultPointer64< IMP >::setPtrRelease ( typename AtomicTypes::Pointer *  atomicPtr,
void *  value 
)
inlinestatic

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

◆ swapPtr()

template<class IMP >
void * bsls::AtomicOperations_DefaultPointer64< IMP >::swapPtr ( typename AtomicTypes::Pointer *  atomicPtr,
void *  swapValue 
)
inlinestatic

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

◆ swapPtrAcqRel()

template<class IMP >
void * bsls::AtomicOperations_DefaultPointer64< IMP >::swapPtrAcqRel ( typename AtomicTypes::Pointer *  atomicPtr,
void *  swapValue 
)
inlinestatic

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

◆ testAndSwapPtr()

template<class IMP >
void * bsls::AtomicOperations_DefaultPointer64< IMP >::testAndSwapPtr ( typename AtomicTypes::Pointer *  atomicPtr,
void *  compareValue,
void *  swapValue 
)
inlinestatic

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

◆ testAndSwapPtrAcqRel()

template<class IMP >
void * bsls::AtomicOperations_DefaultPointer64< IMP >::testAndSwapPtrAcqRel ( typename AtomicTypes::Pointer *  atomicPtr,
void *  compareValue,
void *  swapValue 
)
inlinestatic

Conditionally set the value of the specified atomicPtr to the specified swapValue if and only if the value of atomicPtr equals the value of the specified compareValue, and return the initial value of atomicPtr, providing the acquire/release memory ordering guarantee. The whole operation is performed atomically.


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