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

#include <pushback_op.h>

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

Public Member Functions

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

static size_t execute (Vector< T > *vec, T val)
 

Private Attributes

Vector< T > * vec_
 
new_val_
 
std::atomic< PushOpHelper< T > * > helper_ {nullptr}
 

Friends

class PushOpHelper< T >
 

Constructor & Destructor Documentation

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

Member Function Documentation

template<typename T>
static size_t tervel::containers::wf::vector::PushOp< T >::execute ( Vector< T > *  vec,
val 
)
inlinestatic
template<typename T>
void tervel::containers::wf::vector::PushOp< 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::PushOp< T >::is_watched ( )
inline
template<typename T>
uint64_t tervel::containers::wf::vector::PushOp< T >::result ( )
inline

Friends And Related Function Documentation

template<typename T>
friend class PushOpHelper< T >
friend

Member Data Documentation

template<typename T>
std::atomic<PushOpHelper<T> *> tervel::containers::wf::vector::PushOp< T >::helper_ {nullptr}
private
template<typename T>
T tervel::containers::wf::vector::PushOp< T >::new_val_
private
template<typename T>
Vector<T>* tervel::containers::wf::vector::PushOp< T >::vec_
private

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