OpenImageIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
atomic< T > Class Template Reference

#include <thread.h>

Public Member Functions

 atomic (T val=0)
 
operator() () const
 
 operator T () const
 
fast_value () const
 
operator= (T x)
 
operator++ ()
 
operator++ (int)
 
operator-- ()
 
operator-- (int)
 
operator+= (T x)
 
operator-= (T x)
 
bool bool_compare_and_swap (T compareval, T newval)
 
operator= (const atomic &x)
 

Detailed Description

template<class T>
class atomic< T >

Atomic integer. Increment, decrement, add, and subtract in a totally thread-safe manner.

Constructor & Destructor Documentation

template<class T>
atomic< T >::atomic ( val = 0)
inline

Construct with initial value.

Member Function Documentation

template<class T>
T atomic< T >::fast_value ( ) const
inline

Fast retrieval of value, no interchange, don't care about memory fences.

template<class T>
atomic< T >::operator T ( ) const
inline

Retrieve value

template<class T>
T atomic< T >::operator() ( ) const
inline

Retrieve value

template<class T>
T atomic< T >::operator++ ( )
inline

Pre-increment: ++foo

template<class T>
T atomic< T >::operator++ ( int  )
inline

Post-increment: foo++

template<class T>
T atomic< T >::operator+= ( x)
inline

Add to the value, return the new result

template<class T>
T atomic< T >::operator-- ( )
inline

Pre-decrement: –foo

template<class T>
T atomic< T >::operator-- ( int  )
inline

Post-decrement: foo–

template<class T>
T atomic< T >::operator-= ( x)
inline

Subtract from the value, return the new result

template<class T>
T atomic< T >::operator= ( x)
inline

Assign new value.


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