|
CNum 0.2.1
CPU-optimized ML library for C++
|
Thread local guards for hazard pointers. More...
#include <HazardPointer.h>
Public Member Functions | |
| HazardPtrGuard () | |
| Default constructor. | |
| HazardPtrGuard (const HazardPtrGuard &)=delete | |
| HazardPtrGuard & | operator= (const HazardPtrGuard &)=delete |
| ~HazardPtrGuard () | |
| Destructor. | |
| HazardSlot * | get_slot (size_t idx) |
| Get a pointer to a guard's slot. | |
| void | clear_slot (size_t idx) |
| Clear one of the guard's slots. | |
| void | clear_all_slots () |
| Clear all of the guard's slots. | |
Thread local guards for hazard pointers.
| CNum::DataStructs::HazardPointer::HazardPtrGuard::HazardPtrGuard | ( | ) |
Default constructor.
Acuires ownership of SLOTS_PER_THREAD hazard slots
|
delete |
| CNum::DataStructs::HazardPointer::HazardPtrGuard::~HazardPtrGuard | ( | ) |
Destructor.
Releases ownership of the hazard slots
| void CNum::DataStructs::HazardPointer::HazardPtrGuard::clear_all_slots | ( | ) |
Clear all of the guard's slots.
| void CNum::DataStructs::HazardPointer::HazardPtrGuard::clear_slot | ( | size_t | idx | ) |
Clear one of the guard's slots.
Set the slots store value to nullptr
| idx | The index of the slot we want to clear |
| HazardSlot * CNum::DataStructs::HazardPointer::HazardPtrGuard::get_slot | ( | size_t | idx | ) |
Get a pointer to a guard's slot.
| idx | The number of the slot you need the pointer of |
|
delete |