Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
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 * >:
roc::core::NonCopyable< Tag > roc::core::NonCopyable< Tag >

Public Member Functions

 Atomic (T *val=NULL)
 Initialize with given value.
 
T * exchange (T *val)
 Atomic exchange.
 
bool compare_exchange (T *exp, T *des)
 Atomic compare-and-swap.
 
T * operator-> () const
 Atomic load.
 
T & operator* () const
 Atomic load.
 
 operator T* () const
 Atomic load.
 
T * operator= (T *val)
 Atomic store.
 
T * operator++ ()
 Atomic increment (prefix).
 
T * operator++ (int)
 Atomic increment (postfix).
 
T * operator-- ()
 Atomic decrement (prefix).
 
T * operator-- (int)
 Atomic decrement (postfix).
 
T * operator+= (ptrdiff_t val)
 Atomic addition.
 
T * operator-= (ptrdiff_t val)
 Atomic subtraction.
 
 Atomic (T val=0)
 Initialize with given value.
 
exchange (T val)
 Atomic exchange.
 
bool compare_exchange (T exp, T des)
 Atomic compare-and-swap.
 
fetch_or (T val)
 Atomic fetch-or.
 
fetch_and (T val)
 Atomic fetch-and.
 
fetch_xor (T val)
 Atomic fetch-xor.
 
 operator T () const
 Atomic load.
 
operator= (T val)
 Atomic store.
 
operator++ ()
 Atomic increment (prefix).
 
operator++ (int)
 Atomic increment (postfix).
 
operator-- ()
 Atomic decrement (prefix).
 
operator-- (int)
 Atomic decrement (postfix).
 
operator+= (T val)
 Atomic addition.
 
operator-= (T val)
 Atomic subtraction.
 
operator|= (T val)
 Atomic bitwise or.
 
operator&= (T val)
 Atomic bitwise and.
 
operator^= (T val)
 Atomic bitwise xor.
 

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() [1/2]

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

Initialize with given value.

Definition at line 129 of file atomic.h.

◆ Atomic() [2/2]

roc::core::Atomic< T >::Atomic ( T val = 0)
inlineexplicit

Initialize with given value.

Definition at line 34 of file atomic.h.

Member Function Documentation

◆ compare_exchange() [1/2]

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.

◆ compare_exchange() [2/2]

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

Atomic compare-and-swap.

Definition at line 44 of file atomic.h.

◆ exchange() [1/2]

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

Atomic exchange.

Definition at line 134 of file atomic.h.

◆ exchange() [2/2]

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

Atomic exchange.

Definition at line 39 of file atomic.h.

◆ fetch_and()

T roc::core::Atomic< T >::fetch_and ( T val)
inline

Atomic fetch-and.

Definition at line 54 of file atomic.h.

◆ fetch_or()

T roc::core::Atomic< T >::fetch_or ( T val)
inline

Atomic fetch-or.

Definition at line 49 of file atomic.h.

◆ fetch_xor()

T roc::core::Atomic< T >::fetch_xor ( T val)
inline

Atomic fetch-xor.

Definition at line 59 of file atomic.h.

◆ operator T()

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

Atomic load.

Definition at line 64 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&=()

T roc::core::Atomic< T >::operator&= ( T val)
inline

Atomic bitwise and.

Definition at line 110 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/4]

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

Atomic increment (prefix).

Definition at line 75 of file atomic.h.

◆ operator++() [2/4]

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

Atomic increment (prefix).

Definition at line 165 of file atomic.h.

◆ operator++() [3/4]

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

Atomic increment (postfix).

Definition at line 80 of file atomic.h.

◆ operator++() [4/4]

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

Atomic increment (postfix).

Definition at line 170 of file atomic.h.

◆ operator+=() [1/2]

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

Atomic addition.

Definition at line 185 of file atomic.h.

◆ operator+=() [2/2]

T roc::core::Atomic< T >::operator+= ( T val)
inline

Atomic addition.

Definition at line 95 of file atomic.h.

◆ operator--() [1/4]

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

Atomic decrement (prefix).

Definition at line 85 of file atomic.h.

◆ operator--() [2/4]

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

Atomic decrement (prefix).

Definition at line 175 of file atomic.h.

◆ operator--() [3/4]

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

Atomic decrement (postfix).

Definition at line 90 of file atomic.h.

◆ operator--() [4/4]

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

Atomic decrement (postfix).

Definition at line 180 of file atomic.h.

◆ operator-=() [1/2]

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

Atomic subtraction.

Definition at line 190 of file atomic.h.

◆ operator-=() [2/2]

T roc::core::Atomic< T >::operator-= ( T val)
inline

Atomic subtraction.

Definition at line 100 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=() [1/2]

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

Atomic store.

Definition at line 159 of file atomic.h.

◆ operator=() [2/2]

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

Atomic store.

Definition at line 69 of file atomic.h.

◆ operator^=()

T roc::core::Atomic< T >::operator^= ( T val)
inline

Atomic bitwise xor.

Definition at line 115 of file atomic.h.

◆ operator|=()

T roc::core::Atomic< T >::operator|= ( T val)
inline

Atomic bitwise or.

Definition at line 105 of file atomic.h.


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