BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsls::AtomicUint64 Class Reference

#include <bsls_atomic.h>

Public Member Functions

 AtomicUint64 ()
 
 AtomicUint64 (Types::Uint64 value)
 
 ~AtomicUint64 ()=default
 
AtomicUint64operator= (Types::Uint64 value)
 
Types::Uint64 operator+= (Types::Uint64 value)
 
Types::Uint64 operator-= (Types::Uint64 value)
 
Types::Uint64 operator++ ()
 
Types::Uint64 operator++ (int)
 
Types::Uint64 operator-- ()
 
Types::Uint64 operator-- (int)
 
Types::Uint64 add (Types::Uint64 value)
 
Types::Uint64 addRelaxed (Types::Uint64 value)
 
Types::Uint64 addAcqRel (Types::Uint64 value)
 
void store (Types::Uint64 value)
 
void storeRelaxed (Types::Uint64 value)
 
void storeRelease (Types::Uint64 value)
 
Types::Uint64 subtract (Types::Uint64 value)
 
Types::Uint64 subtractAcqRel (Types::Uint64 value)
 
Types::Uint64 subtractRelaxed (Types::Uint64 value)
 
Types::Uint64 swap (Types::Uint64 swapValue)
 
Types::Uint64 swapAcqRel (Types::Uint64 swapValue)
 
Types::Uint64 testAndSwap (Types::Uint64 compareValue, Types::Uint64 swapValue)
 
Types::Uint64 testAndSwapAcqRel (Types::Uint64 compareValue, Types::Uint64 swapValue)
 
 operator Types::Uint64 () const
 Return the current value of this object.
 
Types::Uint64 load () const
 Return the current value of this object.
 
Types::Uint64 loadRelaxed () const
 
Types::Uint64 loadAcquire () const
 

Detailed Description

This class is implements an atomic 64-bit unsigned integer, which supports common unsigned integer 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

Constructor & Destructor Documentation

◆ AtomicUint64() [1/2]

bsls::AtomicUint64::AtomicUint64 ( )
inline

Create an atomic 64-bit unsigned integer object having the default value 0.

◆ AtomicUint64() [2/2]

bsls::AtomicUint64::AtomicUint64 ( Types::Uint64  value)
inline

Create an atomic 64-bit unsigned integer object having the specified value.

◆ ~AtomicUint64()

bsls::AtomicUint64::~AtomicUint64 ( )
default

Member Function Documentation

◆ add()

Types::Uint64 bsls::AtomicUint64::add ( Types::Uint64  value)
inline

Atomically add the specified value to this object and return the resulting value.

◆ addAcqRel()

Types::Uint64 bsls::AtomicUint64::addAcqRel ( Types::Uint64  value)
inline

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

◆ addRelaxed()

Types::Uint64 bsls::AtomicUint64::addRelaxed ( Types::Uint64  value)
inline

Atomically add the specified value to this object and return the resulting value, providing the relaxed memory ordering guarantee.

◆ load()

Types::Uint64 bsls::AtomicUint64::load ( ) const
inline

◆ loadAcquire()

Types::Uint64 bsls::AtomicUint64::loadAcquire ( ) const
inline

Return the current value of this object, providing the acquire memory ordering guarantee.

◆ loadRelaxed()

Types::Uint64 bsls::AtomicUint64::loadRelaxed ( ) const
inline

Return the current value of this object, providing the relaxed memory ordering guarantee.

◆ operator Types::Uint64()

bsls::AtomicUint64::operator Types::Uint64 ( ) const
inline

◆ operator++() [1/2]

Types::Uint64 bsls::AtomicUint64::operator++ ( )
inline

Atomically increment the value of this object by 1 and return the resulting value.

◆ operator++() [2/2]

Types::Uint64 bsls::AtomicUint64::operator++ ( int  )
inline

Atomically increment the value of this object by 1 and return the value prior to being incremented.

◆ operator+=()

Types::Uint64 bsls::AtomicUint64::operator+= ( Types::Uint64  value)
inline

Atomically add the specified value to this object, and return the resulting value.

◆ operator--() [1/2]

Types::Uint64 bsls::AtomicUint64::operator-- ( )
inline

Atomically decrement the value of this object by 1 and return the resulting value.

◆ operator--() [2/2]

Types::Uint64 bsls::AtomicUint64::operator-- ( int  )
inline

Atomically decrement the value of this object by 1 and return the value prior to being decremented.

◆ operator-=()

Types::Uint64 bsls::AtomicUint64::operator-= ( Types::Uint64  value)
inline

Atomically subtract the specified value from this object, and return the resulting value.

◆ operator=()

AtomicUint64 & bsls::AtomicUint64::operator= ( Types::Uint64  value)
inline

Atomically assign the specified value to this object, and return a reference offering modifiable access to this object.

◆ store()

void bsls::AtomicUint64::store ( Types::Uint64  value)
inline

Atomically assign the specified value to this object, providing the sequential consistency memory ordering guarantee.

◆ storeRelaxed()

void bsls::AtomicUint64::storeRelaxed ( Types::Uint64  value)
inline

Atomically assign the specified value to this object, providing the relaxed memory ordering guarantee.

◆ storeRelease()

void bsls::AtomicUint64::storeRelease ( Types::Uint64  value)
inline

Atomically assign the specified value to this object, providing the release memory ordering guarantee.

◆ subtract()

Types::Uint64 bsls::AtomicUint64::subtract ( Types::Uint64  value)
inline

Atomically subtract the specified value from this object and return the resulting value.

◆ subtractAcqRel()

Types::Uint64 bsls::AtomicUint64::subtractAcqRel ( Types::Uint64  value)
inline

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

◆ subtractRelaxed()

Types::Uint64 bsls::AtomicUint64::subtractRelaxed ( Types::Uint64  value)
inline

Atomically subtract the specified value from this object and return the resulting value, providing the relaxed memory ordering guarantee.

◆ swap()

Types::Uint64 bsls::AtomicUint64::swap ( Types::Uint64  swapValue)
inline

Atomically set the value of this object to the specified swapValue and return its previous value.

◆ swapAcqRel()

Types::Uint64 bsls::AtomicUint64::swapAcqRel ( Types::Uint64  swapValue)
inline

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

◆ testAndSwap()

Types::Uint64 bsls::AtomicUint64::testAndSwap ( Types::Uint64  compareValue,
Types::Uint64  swapValue 
)
inline

Compare the value of this object to the specified compareValue. If they are equal, set the value of this atomic 64-bit unsigned integer to the specified swapValue, otherwise leave this value unchanged. Return the previous value of this atomic unsigned integer, whether or not the swap occurred. Note that the entire test-and-swap operation is performed atomically.

◆ testAndSwapAcqRel()

Types::Uint64 bsls::AtomicUint64::testAndSwapAcqRel ( Types::Uint64  compareValue,
Types::Uint64  swapValue 
)
inline

Compare the value of this object to the specified compareValue. If they are equal, set the value of this atomic 64-bit unsigned integer to the specified swapValue, otherwise leave this value unchanged. Return the previous value of this atomic unsigned integer, whether or not the swap occurred. Note that the entire test-and-swap operation is performed atomically and it provides the acquire/release memory ordering guarantee.


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