From: khizmax Date: Thu, 10 Mar 2016 06:42:55 +0000 (+0300) Subject: Fixed doc X-Git-Tag: v2.2.0~369 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9da937115e15a0c43a7e0aa61098072fcd5b5105;p=libcds.git Fixed doc --- diff --git a/cds/intrusive/michael_set.h b/cds/intrusive/michael_set.h index 98af25a0..c91202ea 100644 --- a/cds/intrusive/michael_set.h +++ b/cds/intrusive/michael_set.h @@ -308,7 +308,7 @@ namespace cds { namespace intrusive { deleting operations it is no guarantee that you iterate all item in the set. Moreover, a crash is possible when you try to iterate the next element that has been deleted by concurrent thread. - @warning Use this iterator on the concurrent container for debugging purpose only. + @warning Use this iterator on the concurrent container for debugging purpose only. */ typedef michael_set::details::iterator< bucket_type, false > iterator; diff --git a/cds/intrusive/michael_set_rcu.h b/cds/intrusive/michael_set_rcu.h index a506f843..bda744f3 100644 --- a/cds/intrusive/michael_set_rcu.h +++ b/cds/intrusive/michael_set_rcu.h @@ -156,11 +156,15 @@ namespace cds { namespace intrusive { //@endcond public: + ///@name Forward iterators (only for debugging purpose) + //@{ /// Forward iterator /** The forward iterator for Michael's set is based on \p OrderedList forward iterator and has some features: - it has no post-increment operator - it iterates items in unordered fashion + + @warning Use this iterator on the concurrent container for debugging purpose only. */ typedef michael_set::details::iterator< bucket_type, false > iterator; @@ -191,28 +195,29 @@ namespace cds { namespace intrusive { } /// Returns a forward const iterator addressing the first element in a set - //@{ const_iterator begin() const { return cbegin(); } + + /// Returns a forward const iterator addressing the first element in a set const_iterator cbegin() const { return const_iterator( m_Buckets[0].cbegin(), m_Buckets, m_Buckets + bucket_count() ); } - //@} /// Returns an const iterator that addresses the location succeeding the last element in a set - //@{ const_iterator end() const { return cend(); } + + /// Returns an const iterator that addresses the location succeeding the last element in a set const_iterator cend() const { return const_iterator( m_Buckets[bucket_count() - 1].cend(), m_Buckets + bucket_count() - 1, m_Buckets + bucket_count() ); } - //@} + //@} public: /// Initialize hash set @@ -439,6 +444,7 @@ namespace cds { namespace intrusive { Depends on \p bucket_type you should or should not lock RCU before calling of this function: - for the set based on \ref cds_intrusive_MichaelList_rcu "MichaelList" RCU should not be locked - for the set based on \ref cds_intrusive_LazyList_rcu "LazyList" RCU should be locked + See ordered list implementation for details. \code