Honeycomb  0.1
Component-Model Framework
Classes | Public Member Functions | List of all members
honey::Atomic< T, false > Class Template Reference

Wrapper around a trivially copyable type to make load/store operations atomic and sequentially consistent. More...

#include <Atomic.h>

Public Member Functions

 Atomic ()=default
 Trivial constructor, does not initialize the underlying value. More...
 
 Atomic (T val)
 Initialize the underlying value to val More...
 
 Atomic (const Atomic &val)
 
operator= (T val) volatile
 Assign value. More...
 
operator= (const Atomic &val) volatile
 
 operator T () const volatile
 Read value. More...
 
void store (T val, Order o=Order::seqCst) volatile
 
load (Order o=Order::seqCst) const volatile
 
bool cas (T newVal, T cmp, Order o=Order::seqCst) volatile
 Compare and swap. If atomic is equal to comparand cmp then atomic is assigned to newVal and true is returned. Returns false otherwise. More...
 

Detailed Description

template<class T>
class honey::Atomic< T, false >

Wrapper around a trivially copyable type to make load/store operations atomic and sequentially consistent.

Constructor & Destructor Documentation

template<class T >
honey::Atomic< T, false >::Atomic ( )
default

Trivial constructor, does not initialize the underlying value.

template<class T >
honey::Atomic< T, false >::Atomic ( val)
inline

Initialize the underlying value to val

template<class T >
honey::Atomic< T, false >::Atomic ( const Atomic< T, false > &  val)
inline

Member Function Documentation

template<class T >
bool honey::Atomic< T, false >::cas ( newVal,
cmp,
Order  o = Order::seqCst 
) volatile
inline

Compare and swap. If atomic is equal to comparand cmp then atomic is assigned to newVal and true is returned. Returns false otherwise.

template<class T >
T honey::Atomic< T, false >::load ( Order  o = Order::seqCst) const volatile
inline
template<class T >
honey::Atomic< T, false >::operator T ( ) const volatile
inline

Read value.

template<class T >
T honey::Atomic< T, false >::operator= ( val) volatile
inline

Assign value.

template<class T >
T honey::Atomic< T, false >::operator= ( const Atomic< T, false > &  val) volatile
inline
template<class T >
void honey::Atomic< T, false >::store ( val,
Order  o = Order::seqCst 
) volatile
inline

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