proxygen
NodeAuto< Atom > Class Template Reference
Inheritance diagram for NodeAuto< Atom >:
folly::hazptr_obj_base_linked< NodeAuto< Atom >, Atom > folly::hazptr_obj_linked< Atom > folly::hazptr_deleter< NodeAuto< Atom >, D > folly::hazptr_obj< Atom >

Public Member Functions

 NodeAuto (NodeAuto *l1=nullptr, NodeAuto *l2=nullptr) noexcept
 
 ~NodeAuto ()
 
NodeAuto< Atom > * link (size_t i)
 
template<typename S >
void push_links (bool m, S &s)
 
- Public Member Functions inherited from folly::hazptr_obj_base_linked< NodeAuto< Atom >, Atom >
void retire ()
 
void unlink ()
 
void unlink_and_reclaim_unchecked ()
 
- Public Member Functions inherited from folly::hazptr_obj_linked< Atom >
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
 
- Public Member Functions inherited from folly::hazptr_deleter< NodeAuto< Atom >, D >
void set_deleter (D d={})
 
void delete_obj (NodeAuto< Atom > *p)
 

Private Attributes

Atom< NodeAuto< Atom > * > link_ [2]
 

Detailed Description

template<template< typename > class Atom = std::atomic>
class NodeAuto< Atom >

NodeAuto

Definition at line 245 of file HazptrTest.cpp.

Constructor & Destructor Documentation

template<template< typename > class Atom = std::atomic>
NodeAuto< Atom >::NodeAuto ( NodeAuto< Atom > *  l1 = nullptr,
NodeAuto< Atom > *  l2 = nullptr 
)
inlineexplicitnoexcept

Definition at line 249 of file HazptrTest.cpp.

References Count::inc_ctors().

249  {
250  this->set_deleter();
251  link_[0].store(l1, std::memory_order_relaxed);
252  link_[1].store(l2, std::memory_order_relaxed);
253  c_.inc_ctors();
254  }
void inc_ctors() noexcept
Definition: HazptrTest.cpp:81
static Count c_
Definition: HazptrTest.cpp:94
Atom< NodeAuto< Atom > * > link_[2]
Definition: HazptrTest.cpp:246
template<template< typename > class Atom = std::atomic>
NodeAuto< Atom >::~NodeAuto ( )
inline

Definition at line 256 of file HazptrTest.cpp.

References Count::inc_dtors().

256  {
257  c_.inc_dtors();
258  }
void inc_dtors() noexcept
Definition: HazptrTest.cpp:85
static Count c_
Definition: HazptrTest.cpp:94

Member Function Documentation

template<template< typename > class Atom = std::atomic>
NodeAuto<Atom>* NodeAuto< Atom >::link ( size_t  i)
inline

Definition at line 260 of file HazptrTest.cpp.

References i.

260  {
261  return link_[i].load(std::memory_order_acquire);
262  }
Atom< NodeAuto< Atom > * > link_[2]
Definition: HazptrTest.cpp:246
template<template< typename > class Atom = std::atomic>
template<typename S >
void NodeAuto< Atom >::push_links ( bool  m,
S s 
)
inline

Definition at line 265 of file HazptrTest.cpp.

References Atom, and i.

265  {
266  if (m == false) { // Immutable
267  for (int i = 0; i < 2; ++i) {
268  auto p = link(i);
269  if (p) {
270  s.push(p);
271  }
272  }
273  }
274  }
static map< string, int > m
static set< string > s
NodeAuto< Atom > * link(size_t i)
Definition: HazptrTest.cpp:260

Member Data Documentation

template<template< typename > class Atom = std::atomic>
Atom<NodeAuto<Atom>*> NodeAuto< Atom >::link_[2]
private

Definition at line 246 of file HazptrTest.cpp.


The documentation for this class was generated from the following file: