|
BDE 4.39.x Production Release
|
#include <bsls_atomic.h>
This class implements an atomic pointer to a parameterized TYPE, which supports common pointer operations in a way that is guaranteed to be atomic. Operations on objects of this class provide the sequential consistency memory ordering guarantee unless explicitly qualified with a less strict consistency guarantee suffix (i.e., Acquire, Release, AcqRel or Relaxed).
See bsls_atomic
Public Member Functions | |
| AtomicPointer () | |
| AtomicPointer (TYPE *value) | |
| ~AtomicPointer ()=default | |
| AtomicPointer< TYPE > & | operator= (TYPE *value) |
| void | store (TYPE *value) |
| void | storeRelaxed (TYPE *value) |
| void | storeRelease (TYPE *value) |
| TYPE * | swap (TYPE *swapValue) |
| TYPE * | swapAcqRel (TYPE *swapValue) |
| TYPE * | testAndSwap (const TYPE *compareValue, TYPE *swapValue) |
| TYPE * | testAndSwapAcqRel (const TYPE *compareValue, TYPE *swapValue) |
| TYPE & | operator* () const |
| TYPE * | operator-> () const |
| operator TYPE * () const | |
| TYPE * | load () const |
| TYPE * | loadRelaxed () const |
| TYPE * | loadAcquire () const |
|
inline |
Create an atomic pointer object having the default value NULL.
|
inline |
Create an atomic pointer object having the specified value.
|
default |
|
inline |
Return the current value of this object.
|
inline |
Return the current value of this object, providing the acquire memory ordering guarantee.
|
inline |
Return the current value of this object, providing the relaxed memory ordering guarantee.
|
inline |
Return the current value of this object.
|
inline |
Return a reference to the value currently pointed to by this object.
|
inline |
Return the current value of this object.
|
inline |
Atomically assign the specified value to this object, and return a reference offering modifiable access to this object.
|
inline |
Atomically assign the specified value to this object, providing the sequential consistency memory ordering guarantee.
|
inline |
Atomically assign the specified value to this object, providing the relaxed memory ordering guarantee.
|
inline |
Atomically assign the specified value to this object, providing the release memory ordering guarantee.
|
inline |
Atomically set the value of this object to the specified swapValue and return its previous value.
|
inline |
Atomically set the value of this object to the specified swapValue and return its previous value, providing the acquire/release memory ordering guarantee.
|
inline |
Compare the value of this object to the specified compareValue. If they are equal, set the value of this atomic pointer to the specified swapValue, otherwise leave this value unchanged. Return the previous value of this atomic pointer, whether or not the swap occurred.
|
inline |
Compare the value of this object to the specified compareValue. If they are equal, set the value of this atomic pointer to the specified swapValue, otherwise leave this value unchanged. Return the previous value of this atomic pointer, whether or not the swap occurred.