25 #ifndef TERVEL_UTIL_MEMORY_HP_POOL_ELEMENT_H_
26 #define TERVEL_UTIL_MEMORY_HP_POOL_ELEMENT_H_
69 #ifdef TERVEL_MEM_HP_NO_FREE
75 }
else if (no_check) {
78 element_list->add_to_unsafe(
this);
80 element_list->try_to_free_elements();
91 virtual bool on_watch(std::atomic<void *> *address,
void *expected) {
132 #endif // TERVEL_UTIL_MEMORY_HP_POOL_ELEMENT_H_
virtual void on_unwatch()
This function is used to remove a strong watch on an Element.
Definition: hp_element.h:106
Element * next()
Helper method for getting the next pointer.
Definition: hp_element.h:113
TODO(steven):
Definition: mcas.h:36
This class is used for the creation of Hazard Pointer Protected Objects Objects which extend it have ...
Definition: hp_element.h:53
Element()
Definition: hp_element.h:55
friend ListManager
Definition: hp_element.h:122
Defines a list of objects which are stored until they are safe to be freed.
Definition: hp_list.h:56
DISALLOW_COPY_AND_ASSIGN(Element)
__thread ThreadContext * tl_thread_info
friend ElementList
Definition: hp_element.h:123
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...
Definition: hp_element.h:67
virtual bool on_watch(std::atomic< void * > *address, void *expected)
This function is used to achieve a strong watch on an Element.
Definition: hp_element.h:91
void next(Element *next)
Helper method for setting the next pointer.
Definition: hp_element.h:118
virtual bool on_is_watched()
This function is used to check a strong watch on an Element.
Definition: hp_element.h:101
Element * next_
Definition: hp_element.h:120
virtual ~Element()
Definition: hp_element.h:56