Removed redundant assertion, minor improvements, docfix
authorkhizmax <libcds.dev@gmail.com>
Mon, 14 Mar 2016 21:23:11 +0000 (00:23 +0300)
committerkhizmax <libcds.dev@gmail.com>
Mon, 14 Mar 2016 21:23:11 +0000 (00:23 +0300)
cds/intrusive/feldman_hashset_rcu.h
cds/intrusive/impl/feldman_hashset.h

index acd4f7f1924a263e503e3e415f3b5b6fc5779d4f..f915850522e6ded5b931715295459ce0c329a889 100644 (file)
@@ -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:
index 8b26b28f26bea1b9aa2c2d0d41cb30992c945946..fb9e0a8792b8e3224ce273ce4641c3c816cc485b 100644 (file)
@@ -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;