proxygen
|
#include <Hazptr-fwd.h>
Private Attributes | |
hazptr_rec< Atom > * | hprec_ |
Classes related to hazard pointer holders. Defined in HazptrHolder.hhazptr_holder
Classes related to hazard pointer holders. hazptr_holder
Class for automatic acquisition and release of hazard pointers, and interface for hazard pointer operations.
Usage example: T* ptr; { hazptr_holder h; ptr = h.get_protected(src); // ... *ptr is protected ... h.reset(); // ... *ptr is not protected ... ptr = src.load(); while (!h.try_protect(ptr, src)) {} // ... *ptr is protected ... } // ... *ptr is not protected
Definition at line 155 of file Hazptr-fwd.h.
|
inlineexplicit |
Constructor - automatically acquires a hazard pointer.
Definition at line 57 of file HazptrHolder.h.
References folly::hazptr_holder< Atom >::hprec(), and LIKELY.
Referenced by folly::hazptr_holder< Atom >::hazptr_holder(), and folly::hazptr_holder< Atom >::operator=().
|
inlineexplicitnoexcept |
|
inlinenoexcept |
Move constructor
Definition at line 76 of file HazptrHolder.h.
References folly::hazptr_holder< Atom >::hazptr_holder(), folly::hazptr_holder< Atom >::operator=(), and folly::detail::rhs.
|
delete |
|
inline |
Destructor
Definition at line 85 of file HazptrHolder.h.
References folly::hazptr_rec< Atom >::domain(), LIKELY, and folly::hazptr_rec< Atom >::reset_hazptr().
Referenced by folly::hazptr_holder< Atom >::operator=().
|
inlinenoexcept |
get_protected
Definition at line 138 of file HazptrHolder.h.
References folly::pushmi::detail::t, and folly::T.
Referenced by folly::HazptrWideCAS< T, Atom >::cas(), folly::UnboundedQueue< T, false, 6 >::dequeueImpl(), folly::UnboundedQueue< T, false, 6 >::enqueueImpl(), folly::detail::ConcurrentHashMapSegment< KeyType, ValueType, ShardBits, HashFn, KeyEqual, Allocator, Atom, Mutex >::getBucketsAndCount(), mt_linked_test(), folly::RelaxedConcurrentPriorityQueue< T, MayBlock, SupportsSize, PopBatch, ListTargetSize, Mutex, Atom >::optimisticReadValue(), folly::HazptrLockFreeLIFO< T, Atom >::pop(), List< T, Atom >::protect_all(), and folly::UnboundedQueue< T, false, 6 >::tryDequeueUntil().
|
inlinenoexcept |
Definition at line 143 of file HazptrHolder.h.
References f, ptr, folly::T, and folly::hazptr_holder< Atom >::try_protect().
|
inlinenoexcept |
Returns a pointer to the owned hazptr_rec
Definition at line 173 of file HazptrHolder.h.
References folly::hazptr_holder< Atom >::hprec_.
Referenced by folly::hazptr_array< 3, Atom >::hazptr_array(), folly::hazptr_holder< Atom >::hazptr_holder(), folly::hazptr_local< M, Atom >::hazptr_local(), folly::hazptr_holder< Atom >::set_hprec(), and folly::hazptr_array< 3, Atom >::~hazptr_array().
|
delete |
|
inlinenoexcept |
Move operator
Definition at line 101 of file HazptrHolder.h.
References folly::hazptr_holder< Atom >::hazptr_holder(), LIKELY, folly::detail::rhs, and folly::hazptr_holder< Atom >::~hazptr_holder().
|
inlinenoexcept |
reset
Definition at line 153 of file HazptrHolder.h.
References ptr, folly::hazptr_rec< Atom >::reset_hazptr(), and folly::T.
Referenced by basic_protection_test(), folly::HazptrWideCAS< T, Atom >::cas(), move_test(), folly::HazptrLockFreeLIFO< T, Atom >::pop(), folly::hazptr_holder< Atom >::try_protect(), and virtual_test().
|
inlinenoexcept |
Definition at line 159 of file HazptrHolder.h.
References folly::hazptr_rec< Atom >::reset_hazptr().
|
inlinenoexcept |
Set the pointer to the owned hazptr_rec
Definition at line 178 of file HazptrHolder.h.
References Atom, and folly::hazptr_holder< Atom >::hprec().
|
inlinenoexcept |
Definition at line 168 of file HazptrHolder.h.
References folly::detail::rhs, and folly::swap().
|
inlinenoexcept |
Hazard pointer operations try_protect
Definition at line 116 of file HazptrHolder.h.
References FOLLY_ALWAYS_INLINE, ptr, folly::pushmi::detail::t, and folly::T.
Referenced by folly::HazptrSWMRSet< T, Atom >::contains(), folly::hazptr_holder< Atom >::get_protected(), and List< T, Atom >::hand_over_hand().
|
inlinenoexcept |
Definition at line 122 of file HazptrHolder.h.
References folly::asymmetricLightBarrier(), f, ptr, folly::hazptr_holder< Atom >::reset(), and UNLIKELY.
|
private |
Definition at line 53 of file HazptrHolder.h.
Referenced by folly::hazptr_holder< Atom >::hprec().