Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::core::Atomic< T * > Class Template Reference

Atomic pointer. Provides sequential consistency. For a fine-grained memory order control, see AtomicOps. More...

#include <atomic.h>

Inheritance diagram for roc::core::Atomic< T * >:
Collaboration diagram for roc::core::Atomic< T * >:

Public Member Functions

 Atomic (T *val=NULL)
 Initialize with given value. More...
 
T * exchange (T *val)
 Atomic exchange. More...
 
bool compare_exchange (T *exp, T *des)
 Atomic compare-and-swap. More...
 
T * operator-> () const
 Atomic load. More...
 
T & operator* () const
 Atomic load. More...
 
 operator T* () const
 Atomic load. More...
 
T * operator= (T *val)
 Atomic store. More...
 
T * operator++ ()
 Atomic increment (prefix). More...
 
T * operator++ (int)
 Atomic increment (postfix). More...
 
T * operator-- ()
 Atomic decrement (prefix). More...
 
T * operator-- (int)
 Atomic decrement (postfix). More...
 
T * operator+= (ptrdiff_t val)
 Atomic addition. More...
 
T * operator-= (ptrdiff_t val)
 Atomic subtraction. More...
 

Detailed Description

template<class T>
class roc::core::Atomic< T * >

Atomic pointer. Provides sequential consistency. For a fine-grained memory order control, see AtomicOps.

Definition at line 126 of file atomic.h.

Constructor & Destructor Documentation

◆ Atomic()

template<class T >
roc::core::Atomic< T * >::Atomic ( T *  val = NULL)
inlineexplicit

Initialize with given value.

Definition at line 129 of file atomic.h.

Member Function Documentation

◆ compare_exchange()

template<class T >
bool roc::core::Atomic< T * >::compare_exchange ( T *  exp,
T *  des 
)
inline

Atomic compare-and-swap.

Definition at line 139 of file atomic.h.

◆ exchange()

template<class T >
T* roc::core::Atomic< T * >::exchange ( T *  val)
inline

Atomic exchange.

Definition at line 134 of file atomic.h.

◆ operator T*()

template<class T >
roc::core::Atomic< T * >::operator T* ( ) const
inline

Atomic load.

Definition at line 154 of file atomic.h.

◆ operator*()

template<class T >
T& roc::core::Atomic< T * >::operator* ( ) const
inline

Atomic load.

Definition at line 149 of file atomic.h.

◆ operator++() [1/2]

template<class T >
T* roc::core::Atomic< T * >::operator++ ( )
inline

Atomic increment (prefix).

Definition at line 165 of file atomic.h.

◆ operator++() [2/2]

template<class T >
T* roc::core::Atomic< T * >::operator++ ( int  )
inline

Atomic increment (postfix).

Definition at line 170 of file atomic.h.

◆ operator+=()

template<class T >
T* roc::core::Atomic< T * >::operator+= ( ptrdiff_t  val)
inline

Atomic addition.

Definition at line 185 of file atomic.h.

◆ operator--() [1/2]

template<class T >
T* roc::core::Atomic< T * >::operator-- ( )
inline

Atomic decrement (prefix).

Definition at line 175 of file atomic.h.

◆ operator--() [2/2]

template<class T >
T* roc::core::Atomic< T * >::operator-- ( int  )
inline

Atomic decrement (postfix).

Definition at line 180 of file atomic.h.

◆ operator-=()

template<class T >
T* roc::core::Atomic< T * >::operator-= ( ptrdiff_t  val)
inline

Atomic subtraction.

Definition at line 190 of file atomic.h.

◆ operator->()

template<class T >
T* roc::core::Atomic< T * >::operator-> ( ) const
inline

Atomic load.

Definition at line 144 of file atomic.h.

◆ operator=()

template<class T >
T* roc::core::Atomic< T * >::operator= ( T *  val)
inline

Atomic store.

Definition at line 159 of file atomic.h.


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