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

#include <popbackwra_op.h>

Inheritance diagram for tervel::containers::wf::vector::PopWRAOp< T >:
tervel::util::OpRecord tervel::util::memory::hp::Element

Public Member Functions

 PopWRAOp (Vector< T > *vec)
 
 ~PopWRAOp ()
 
void set_failed ()
 
void help_complete ()
 Implementations of this function that upon its return the operation described in the OpRecord has been completed. More...
 
bool result (T &val)
 
bool result ()
 
- 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...
 

Static Public Attributes

static constexpr PopWRAOpHelper< T > * is_empty_const {reinterpret_cast<PopWRAOpHelper<T> *>(0x1L)}
 

Private Attributes

Vector< T > * vec_
 
std::atomic< T > value_ {Vector<T>::c_not_value_}
 
std::atomic< T > * prev_spot_ {nullptr}
 
std::atomic< PopWRAOpHelper< T > * > helper_ {nullptr}
 

Friends

class PopWRAOpHelper< T >
 

Constructor & Destructor Documentation

template<typename T>
tervel::containers::wf::vector::PopWRAOp< T >::PopWRAOp ( Vector< T > *  vec)
inline
template<typename T>
tervel::containers::wf::vector::PopWRAOp< T >::~PopWRAOp ( )
inline

Member Function Documentation

template<typename T>
void tervel::containers::wf::vector::PopWRAOp< T >::help_complete ( )
inlinevirtual

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>
bool tervel::containers::wf::vector::PopWRAOp< T >::result ( T &  val)
inline
template<typename T>
bool tervel::containers::wf::vector::PopWRAOp< T >::result ( )
inline
template<typename T>
void tervel::containers::wf::vector::PopWRAOp< T >::set_failed ( )
inline

Friends And Related Function Documentation

template<typename T>
friend class PopWRAOpHelper< T >
friend

Member Data Documentation

template<typename T>
std::atomic<PopWRAOpHelper<T> *> tervel::containers::wf::vector::PopWRAOp< T >::helper_ {nullptr}
private
template<typename T>
constexpr PopWRAOpHelper<T>* tervel::containers::wf::vector::PopWRAOp< T >::is_empty_const {reinterpret_cast<PopWRAOpHelper<T> *>(0x1L)}
static
template<typename T>
std::atomic<T>* tervel::containers::wf::vector::PopWRAOp< T >::prev_spot_ {nullptr}
private
template<typename T>
std::atomic<T> tervel::containers::wf::vector::PopWRAOp< T >::value_ {Vector<T>::c_not_value_}
private
template<typename T>
Vector<T>* tervel::containers::wf::vector::PopWRAOp< T >::vec_
private

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