25 #ifndef TERVEL_MEMORY_HP_HAZARD_POINTER_H_
26 #define TERVEL_MEMORY_HP_HAZARD_POINTER_H_
97 static bool watch(
SlotID slot_id,
void *value, std::atomic<void *> *address
190 size_t s =
static_cast<size_t>(id) + (static_cast<size_t>(
SlotID::END) *
213 #endif // TERVEL_MEMORY_HP_HAZARD_POINTER_H_
size_t get_slot(SlotID id)
This function calculates a the position of a threads slot for the specified SlotID.
Definition: hazard_pointer.h:189
static bool is_watched(Element *descr, HazardPointer *const hazard_pointer=tervel::tl_thread_info->get_hazard_pointer())
This method is used to determine if a hazard pointer watch exists on a passed value.
std::unique_ptr< std::atomic< void * >[]> watches_
Definition: hazard_pointer.h:196
TODO(steven):
Definition: mcas.h:36
void clear_watch(SlotID slot)
This function takes a SlotID and stores null into that the threads alloted slot for that id in the ha...
Definition: hazard_pointer.h:162
const uint64_t get_thread_id()
A unique ID among all active threads.
const size_t num_slots_
Definition: hazard_pointer.h:197
bool contains(void *value)
This function returns true of the specified value is being watched.
Definition: hazard_pointer.h:173
This class is used for the creation of Hazard Pointer Protected Objects Objects which extend it have ...
Definition: hp_element.h:53
Encapsulates a shared central 'to free list' between several thread-local lists.
Definition: list_manager.h:58
__thread ThreadContext * tl_thread_info
static void unwatch(SlotID slot_id, HazardPointer *const hazard_pointer=tervel::tl_thread_info->get_hazard_pointer())
This method is used to remove the hazard pointer watch.
void watch(SlotID slot, void *value)
This function takes a SlotID and stores the specified value into that the threads alloted slot for th...
Definition: hazard_pointer.h:152
static bool watch(SlotID slot_id, Element *elem, std::atomic< void * > *address, void *expected, HazardPointer *const hazard_pointer=tervel::tl_thread_info->get_hazard_pointer())
This method is used to achieve a hazard pointer watch on the the based descr.
DISALLOW_COPY_AND_ASSIGN(HazardPointer)
HazardPointer(int num_threads)
util::memory::hp::ListManager hp_list_manager_
Definition: hazard_pointer.h:201
This class is used to maintain the list of hazard pointed objects.
Definition: hazard_pointer.h:56
SlotID
Definition: hazard_pointer.h:58