Tervel  1.0.0
A collection of wait-free containers and algorithms.
Public Member Functions | Private Member Functions | List of all members
tervel::util::OpRecord Class Referenceabstract

This class is used to create Operation Records. More...

#include <progress_assurance.h>

Inheritance diagram for tervel::util::OpRecord:
tervel::util::memory::hp::Element tervel::algorithms::wf::mcas::MultiWordCompareAndSwap< T > tervel::containers::wf::HashMap< Key, Value, Functor >::ForceExpandOp tervel::containers::wf::RingBuffer< T >::BufferOp tervel::containers::wf::vector::PopOp< T > tervel::containers::wf::vector::PopWRAOp< T > tervel::containers::wf::vector::PushOp< T > tervel::containers::wf::vector::PushWRAOp< T > tervel::containers::wf::vector::ReadOp< T > tervel::containers::wf::vector::WriteOp< T > tervel::util::memory::rc::ReadFirstOp

Public Member Functions

 OpRecord ()
 
virtual void help_complete ()=0
 Implementations of this function that upon its return the operation described in the OpRecord has been completed. More...
 
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 (OpRecord)
 

Detailed Description

This class is used to create Operation Records.

Operation records are designed to allow an arbitary thread to complete some other thread's operation in the event that thread is unable to do so. These objects are HP protected.

Constructor & Destructor Documentation

tervel::util::OpRecord::OpRecord ( )
inline

Member Function Documentation

tervel::util::OpRecord::DISALLOW_COPY_AND_ASSIGN ( OpRecord  )
private
virtual void tervel::util::OpRecord::help_complete ( )
pure virtual
bool tervel::util::OpRecord::on_is_watched ( )
inlinevirtual

This function is used to check a strong watch on an Element.

Classes wishing to express this should override this function.

Returns
whether or not the element is watched.

Reimplemented from tervel::util::memory::hp::Element.

void tervel::util::OpRecord::on_unwatch ( )
inlinevirtual

This function is used to remove a strong watch on an Element.

Classes wishing to express this should override this function.

Reimplemented from tervel::util::memory::hp::Element.

bool tervel::util::OpRecord::on_watch ( std::atomic< void * > *  address,
void *  expected 
)
inlinevirtual

This function is used to achieve a strong watch on an Element.

Classes wishing to express this should override this function.

Parameters
addressthe expected was load from
expectedthe last known value of address
Returns
whether or not the element was succefully watched.

Reimplemented from tervel::util::memory::hp::Element.


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