Tervel  1.0.0
A collection of wait-free containers and algorithms.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
tervel::containers::wf::RingBuffer< T >::EnqueueOp< T > Class Template Reference

#include <enqueue_op.h>

Inheritance diagram for tervel::containers::wf::RingBuffer< T >::EnqueueOp< T >:
tervel::containers::wf::RingBuffer< T >::BufferOp tervel::util::OpRecord tervel::util::memory::hp::Element

Public Member Functions

 EnqueueOp (RingBuffer< T > *rb, T value)
 
void * associate (Helper *h)
 
void help_complete ()
 Implementations of this function that upon its return the operation described in the OpRecord has been completed. More...
 
bool result ()
 
- Public Member Functions inherited from tervel::containers::wf::RingBuffer< T >::BufferOp
 BufferOp (RingBuffer< T > *rb)
 
 ~BufferOp ()
 
bool privAssociate (Helper *h)
 
bool valid (Helper *h)
 
void fail ()
 
bool isFail (Helper *&h)
 
HelpergetHelper ()
 
bool notDone ()
 
 DISALLOW_COPY_AND_ASSIGN (BufferOp)
 
- Public Member Functions inherited from tervel::util::OpRecord
 OpRecord ()
 
bool on_watch (std::atomic< void * > *address, void *expected)
 This function is used to achieve a strong watch on an Element. More...
 
bool on_is_watched ()
 This function is used to check a strong watch on an Element. More...
 
void on_unwatch ()
 This function is used to remove a strong watch on an Element. More...
 
- Public Member Functions inherited from tervel::util::memory::hp::Element
 Element ()
 
virtual ~Element ()
 
void safe_delete (bool no_check=false, ElementList *const element_list=tervel::tl_thread_info->get_hp_element_list())
 This function is used to free a hazard pointer protected object if it is safe to do so OR add it to a list to be freed later. More...
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (EnqueueOp)
 

Private Attributes

const T value_
 

Additional Inherited Members

- Public Attributes inherited from tervel::containers::wf::RingBuffer< T >::BufferOp
RingBuffer< T > * rb_
 
std::atomic< Helper * > helper_ {nullptr}
 
- Static Public Attributes inherited from tervel::containers::wf::RingBuffer< T >::BufferOp
static constexpr Helperfail_val_ = reinterpret_cast<Helper *>(0x1L)
 

Constructor & Destructor Documentation

template<typename T>
template<typename T >
tervel::containers::wf::RingBuffer< T >::EnqueueOp< T >::EnqueueOp ( RingBuffer< T > *  rb,
value 
)
inline

Member Function Documentation

template<typename T>
template<typename T >
void * tervel::containers::wf::RingBuffer< T >::EnqueueOp< T >::associate ( Helper h)
virtual
template<typename T>
template<typename T >
tervel::containers::wf::RingBuffer< T >::EnqueueOp< T >::DISALLOW_COPY_AND_ASSIGN ( EnqueueOp< T >  )
private
template<typename T>
template<typename T >
void tervel::containers::wf::RingBuffer< T >::EnqueueOp< T >::help_complete ( )
virtual

Implementations of this function that upon its return the operation described in the OpRecord has been completed.

As such it must be thread-safe and the extending class must contain all the information necessary to complete the operation.

Implements tervel::util::OpRecord.

template<typename T>
template<typename T >
bool tervel::containers::wf::RingBuffer< T >::EnqueueOp< T >::result ( )

Member Data Documentation

template<typename T>
template<typename T >
const T tervel::containers::wf::RingBuffer< T >::EnqueueOp< T >::value_
private

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