proxygen
|
#include <Hazptr-fwd.h>
Public Member Functions | |
void | acquire_link () noexcept |
void | acquire_link_safe () noexcept |
void | acquire_ref () noexcept |
void | acquire_ref_safe () noexcept |
Public Member Functions inherited from folly::hazptr_obj< Atom > | |
hazptr_obj () noexcept | |
hazptr_obj (const hazptr_obj< Atom > &) noexcept | |
hazptr_obj (hazptr_obj< Atom > &&) noexcept | |
hazptr_obj< Atom > & | operator= (const hazptr_obj< Atom > &) noexcept |
hazptr_obj< Atom > & | operator= (hazptr_obj< Atom > &&) noexcept |
Private Types | |
using | Count = uint32_t |
Private Member Functions | |
Count | count () const noexcept |
void | count_set (Count val) noexcept |
void | count_inc (Count add) noexcept |
void | count_inc_safe (Count add) noexcept |
bool | count_cas (Count &oldval, Count newval) noexcept |
bool | release_link () noexcept |
bool | release_ref () noexcept |
bool | downgrade_link () noexcept |
Private Attributes | |
Atom< Count > | count_ {0} |
Static Private Attributes | |
static constexpr Count | kRef = 1u |
static constexpr Count | kLink = 1u << 16 |
static constexpr Count | kRefMask = kLink - 1u |
static constexpr Count | kLinkMask = ~kRefMask |
Friends | |
template<typename , template< typename > class, typename > | |
class | hazptr_obj_base_linked |
Base class template for link counted objects. Supports:
Two inbound link counts are maintained per object:
User code can increment the link and ref counts by calling acquire_link and acquire_ref or their variants that require the user to guarantee thread safety. There are no public functions to decrement the counts explicitly. Counts are decremented implicitly as described in hazptr_obj_base_linked.
Definition at line 79 of file Hazptr-fwd.h.
|
private |
Definition at line 92 of file HazptrObjLinked.h.
|
inlinenoexcept |
Definition at line 102 of file HazptrObjLinked.h.
|
inlinenoexcept |
Definition at line 106 of file HazptrObjLinked.h.
Referenced by auto_retire_test(), and basic_objects_test().
|
inlinenoexcept |
Definition at line 110 of file HazptrObjLinked.h.
|
inlinenoexcept |
Definition at line 114 of file HazptrObjLinked.h.
|
inlineprivatenoexcept |
Definition at line 122 of file HazptrObjLinked.h.
|
inlineprivatenoexcept |
Definition at line 143 of file HazptrObjLinked.h.
|
inlineprivatenoexcept |
|
inlineprivatenoexcept |
Definition at line 136 of file HazptrObjLinked.h.
|
inlineprivatenoexcept |
|
inlineprivatenoexcept |
Definition at line 180 of file HazptrObjLinked.h.
References Atom, count, D, and folly::gen::sub().
|
inlineprivatenoexcept |
Definition at line 148 of file HazptrObjLinked.h.
References count, and folly::gen::sub().
|
inlineprivatenoexcept |
Definition at line 163 of file HazptrObjLinked.h.
References count, folly::kIsDebug, and folly::gen::sub().
|
friend |
Definition at line 120 of file HazptrObjLinked.h.
|
private |
Definition at line 99 of file HazptrObjLinked.h.
|
staticprivate |
Definition at line 95 of file HazptrObjLinked.h.
|
staticprivate |
Definition at line 97 of file HazptrObjLinked.h.
|
staticprivate |
Definition at line 94 of file HazptrObjLinked.h.
|
staticprivate |
Definition at line 96 of file HazptrObjLinked.h.