Tervel
1.0.0
A collection of wait-free containers and algorithms.
|
This class is used to create Operation Records. More...
#include <progress_assurance.h>
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) | |
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.
|
inline |
|
private |
|
pure 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.
Implemented in tervel::containers::wf::HashMap< Key, Value, Functor >::ForceExpandOp, tervel::containers::wf::vector::PopOp< T >, tervel::containers::wf::vector::PushOp< T >, tervel::algorithms::wf::mcas::MultiWordCompareAndSwap< T >, tervel::containers::wf::vector::PopWRAOp< T >, tervel::containers::wf::vector::WriteOp< T >, tervel::containers::wf::vector::PushWRAOp< T >, tervel::util::memory::rc::ReadFirstOp, tervel::containers::wf::RingBuffer< T >::EnqueueOp< T >, tervel::containers::wf::vector::ReadOp< T >, and tervel::containers::wf::RingBuffer< T >::DequeueOp< T >.
|
inlinevirtual |
This function is used to check a strong watch on an Element.
Classes wishing to express this should override this function.
Reimplemented from tervel::util::memory::hp::Element.
|
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.
|
inlinevirtual |
This function is used to achieve a strong watch on an Element.
Classes wishing to express this should override this function.
address | the expected was load from |
expected | the last known value of address |
Reimplemented from tervel::util::memory::hp::Element.