From: khizmax Date: Mon, 14 Mar 2016 21:23:11 +0000 (+0300) Subject: Removed redundant assertion, minor improvements, docfix X-Git-Tag: v2.2.0~354 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=746efa8935bd360376412757573c965b55401cf6;p=libcds.git Removed redundant assertion, minor improvements, docfix --- diff --git a/cds/intrusive/feldman_hashset_rcu.h b/cds/intrusive/feldman_hashset_rcu.h index acd4f7f1..f9158505 100644 --- a/cds/intrusive/feldman_hashset_rcu.h +++ b/cds/intrusive/feldman_hashset_rcu.h @@ -113,6 +113,10 @@ namespace cds { namespace intrusive { using exempt_ptr = cds::urcu::exempt_ptr< gc, value_type, value_type, disposer, void >; ///< pointer to extracted node + //@cond + typedef feldman_hashset::level_statistics level_statistics; + //@endcond + protected: //@cond typedef typename base_class::node_ptr node_ptr; @@ -586,13 +590,11 @@ namespace cds { namespace intrusive { value_type * pointer() const CDS_NOEXCEPT { - assert(gc::is_locked()); return m_pValue; } void forward() { - assert( gc::is_locked()); assert(m_set != nullptr); assert(m_pNode != nullptr); @@ -649,7 +651,6 @@ namespace cds { namespace intrusive { void backward() { - assert(gc::is_locked()); assert(m_set != nullptr); assert(m_pNode != nullptr); @@ -896,7 +897,7 @@ namespace cds { namespace intrusive { The set supports thread-safe iterators: you may iterate over the set in multi-threaded environment under explicit RCU lock. RCU lock requirement means that inserting or searching is allowed but you must not erase the items from the set - since erasing under RCU lock can lead to a deadlock. However, another thread can call \p erase() safely + because erasing under RCU lock can lead to a deadlock. However, another thread can call \p erase() safely while your thread is iterating. A typical example is: diff --git a/cds/intrusive/impl/feldman_hashset.h b/cds/intrusive/impl/feldman_hashset.h index 8b26b28f..fb9e0a87 100644 --- a/cds/intrusive/impl/feldman_hashset.h +++ b/cds/intrusive/impl/feldman_hashset.h @@ -145,6 +145,10 @@ namespace cds { namespace intrusive { /// Count of hazard pointers required static CDS_CONSTEXPR size_t const c_nHazardPtrCount = 2; + //@cond + typedef feldman_hashset::level_statistics level_statistics; + //@endcond + protected: //@cond typedef typename base_class::node_ptr node_ptr;