pion-net  4.0.9
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
boost::lockfree::tagged_ptr< T > Class Template Reference

Public Types

typedef std::size_t tag_t
 

Public Member Functions

 tagged_ptr (void)
 
 tagged_ptr (tagged_ptr const &p)
 
 tagged_ptr (T *p, tag_t t=0)
 
void operator= (tagged_ptr const &p)
 
void atomic_set (tagged_ptr const &p)
 
void atomic_set (T *p, tag_t t)
 
void set (tagged_ptr const &p)
 
void set (T *p, tag_t t)
 
bool operator== (tagged_ptr const &p) const
 
bool operator!= (tagged_ptr const &p) const
 
T * get_ptr () const
 
void set_ptr (T *p)
 
tag_t get_tag () const
 
void set_tag (tag_t t)
 
bool cas (tagged_ptr const &oldval, T *newptr)
 
bool cas (tagged_ptr const &oldval, T *newptr, tag_t t)
 
T & operator* () const
 
T * operator-> () const
 
 operator bool (void) const
 

Static Public Attributes

static const bool is_lockfree = boost::lockfree::atomic_cas<tagged_ptr>::is_lockfree
 

Protected Attributes

T * ptr
 
tag_t tag
 

Detailed Description

template<class T>
class boost::lockfree::tagged_ptr< T >

Definition at line 25 of file tagged_ptr_dcas.hpp.

Constructor & Destructor Documentation

template<class T>
boost::lockfree::tagged_ptr< T >::tagged_ptr ( void  )
inline

uninitialized constructor

Definition at line 33 of file tagged_ptr_dcas.hpp.

template<class T>
boost::lockfree::tagged_ptr< T >::tagged_ptr ( tagged_ptr< T > const &  p)
inline

copy constructor

Definition at line 37 of file tagged_ptr_dcas.hpp.

Member Function Documentation

template<class T>
bool boost::lockfree::tagged_ptr< T >::cas ( tagged_ptr< T > const &  oldval,
T *  newptr 
)
inline

compare and swap

Definition at line 133 of file tagged_ptr_dcas.hpp.

Referenced by pion::PionLockFreeQueue< T >::pop(), and pion::PionLockFreeQueue< T >::push().

template<class T>
T* boost::lockfree::tagged_ptr< T >::get_ptr ( ) const
inline
template<class T>
tag_t boost::lockfree::tagged_ptr< T >::get_tag ( ) const
inline

tag access

Definition at line 120 of file tagged_ptr_dcas.hpp.

template<class T>
T& boost::lockfree::tagged_ptr< T >::operator* ( ) const
inline

smart pointer support

Definition at line 147 of file tagged_ptr_dcas.hpp.

template<class T>
void boost::lockfree::tagged_ptr< T >::operator= ( tagged_ptr< T > const &  p)
inline

atomic set operations

Definition at line 48 of file tagged_ptr_dcas.hpp.

template<class T>
bool boost::lockfree::tagged_ptr< T >::operator== ( tagged_ptr< T > const &  p) const
inline

comparing semantics

Definition at line 94 of file tagged_ptr_dcas.hpp.

template<class T>
void boost::lockfree::tagged_ptr< T >::set ( tagged_ptr< T > const &  p)
inline

unsafe set operation

Definition at line 79 of file tagged_ptr_dcas.hpp.


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