From 06ca4473685f2c0b50dc424b89651df6dc2fc69f Mon Sep 17 00:00:00 2001 From: khizmax Date: Fri, 24 Oct 2014 11:29:48 +0400 Subject: [PATCH] fix doc --- cds/container/details/split_list_base.h | 14 ++++++------- cds/container/michael_list_nogc.h | 2 +- cds/container/michael_list_rcu.h | 2 +- cds/intrusive/impl/michael_list.h | 26 ++++++++++++------------- cds/intrusive/vyukov_mpmc_cycle_queue.h | 2 ++ 5 files changed, 24 insertions(+), 22 deletions(-) diff --git a/cds/container/details/split_list_base.h b/cds/container/details/split_list_base.h index 81db6855..b52b860a 100644 --- a/cds/container/details/split_list_base.h +++ b/cds/container/details/split_list_base.h @@ -72,9 +72,9 @@ namespace cds { namespace container { /// Type traits for SplitListSet class /** - Note, the SplitListSet type traits is based on intrusive::split_list::type_traits. - Any member declared in intrusive::split_list::type_traits is also applied to - container::split_list::type_traits. + Note, the SplitListSet type traits is based on intrusive::split_list::traits. + Any member declared in intrusive::split_list::traits is also applied to + container::split_list::traits. */ struct type_traits: public intrusive::split_list::type_traits { @@ -91,9 +91,9 @@ namespace cds { namespace container { If this option is opt::none, the ordered list traits is combined with default ordered list traits and split-list traits. - For \p michael_list_tag, the default traits is \ref container::michael_list::type_traits. + For \p michael_list_tag, the default traits is \p container::michael_list::traits. - For \p lazy_list_tag, the default traits is \ref container::lazy_list::type_traits. + For \p lazy_list_tag, the default traits is \p container::lazy_list::traits. */ typedef opt::none ordered_list_traits; @@ -140,8 +140,8 @@ namespace cds { namespace container { - split_list::ordered_list - a tag for ordered list implementation. See split_list::ordered_list for possible values. - split_list::ordered_list_traits - type traits for ordered list implementation. - For MichaelList use container::michael_list::type_traits, - for LazyList use container::lazy_list::type_traits. + For MichaelList use \p container::michael_list::traits, + for LazyList use \p container::lazy_list::traits. - plus any option from intrusive::split_list::make_traits */ template diff --git a/cds/container/michael_list_nogc.h b/cds/container/michael_list_nogc.h index 8bf852d0..2f970b94 100644 --- a/cds/container/michael_list_nogc.h +++ b/cds/container/michael_list_nogc.h @@ -30,7 +30,7 @@ namespace cds { namespace container { } // namespace details //@endcond - /// Michael's lock-free ordered single-linked list (template specialization for \pgc::nogc) + /// Michael's lock-free ordered single-linked list (template specialization for \p gc::nogc) /** @ingroup cds_nonintrusive_list \anchor cds_nonintrusive_MichaelList_nogc diff --git a/cds/container/michael_list_rcu.h b/cds/container/michael_list_rcu.h index 740f0d86..071b976b 100644 --- a/cds/container/michael_list_rcu.h +++ b/cds/container/michael_list_rcu.h @@ -113,7 +113,7 @@ namespace cds { namespace container { public: typedef cds::urcu::gc gc; ///< RCU typedef T value_type; ///< Type of value stored in the list - typedef Traits traits; /// List traits + typedef Traits traits; ///< List traits typedef typename base_class::back_off back_off; ///< Back-off strategy used typedef typename maker::allocator_type allocator_type; ///< Allocator type used for allocate/deallocate the nodes diff --git a/cds/intrusive/impl/michael_list.h b/cds/intrusive/impl/michael_list.h index f39b8a8c..8c2980ba 100644 --- a/cds/intrusive/impl/michael_list.h +++ b/cds/intrusive/impl/michael_list.h @@ -21,8 +21,8 @@ namespace cds { namespace intrusive { Template arguments: - \p GC - Garbage collector used. Note the \p GC must be the same as the GC used for item type \p T (see \p michael_list::node). - - \p T - type to be stored in the list. The type must be based on michael_list::node (for michael_list::base_hook) - or it must have a member of type michael_list::node (for michael_list::member_hook). + - \p T - type to be stored in the list. The type must be based on \p michael_list::node (for \p michael_list::base_hook) + or it must have a member of type \p michael_list::node (for \p michael_list::member_hook). - \p Traits - type traits, default is \p michael_list::traits. It is possible to declare option-based list with \p cds::intrusive::michael_list::make_traits metafunction: For example, the following traits-based declaration of \p gc::HP Michael's list @@ -69,25 +69,25 @@ namespace cds { namespace intrusive { \endcode \par Usage - There are different specializations of this template for each garbage collecting schema used. + There are different specializations of this template for each garbage collecting schema. You should select GC needed and include appropriate .h-file: - - for gc::HP: \code #include \endcode - - for gc::DHP: \code #include \endcode + - for \p gc::HP: + - for \p gc::DHP: - for \ref cds_urcu_gc "RCU type" - see \ref cds_intrusive_MichaelList_rcu "RCU-based MichaelList" - - for gc::nogc: \code #include \endcode + - for \p gc::nogc: See \ref cds_intrusive_MichaelList_nogc "non-GC MichaelList" - Then, you should incorporate michael_list::node into your struct \p T and provide + Then, you should incorporate \p michael_list::node into your struct \p T and provide appropriate \p michael_list::traits::hook in your \p Traits template parameters. Usually, for \p Traits you define a struct based on \p michael_list::traits. - Example for \p gc::PTB and base hook: + Example for \p gc::DHP and base hook: \code // Include GC-related Michael's list specialization #include // Data stored in Michael's list - struct my_data: public cds::intrusive::michael_list::node< cds::gc::PTB > + struct my_data: public cds::intrusive::michael_list::node< cds::gc::DHP > { // key field std::string strKey; @@ -118,12 +118,12 @@ namespace cds { namespace intrusive { // Declare traits struct my_traits: public cds::intrusive::michael_list::traits { - typedef cds::intrusive::michael_list::base_hook< cds::opt::gc< cds::gc::PTB > > hook; + typedef cds::intrusive::michael_list::base_hook< cds::opt::gc< cds::gc::DHP > > hook; typedef my_data_cmp compare; }; // Declare list type - typedef cds::intrusive::MichaelList< cds::gc::PTB, my_data, my_traits > traits_based_list; + typedef cds::intrusive::MichaelList< cds::gc::DHP, my_data, my_traits > traits_based_list; \endcode Equivalent option-based code: @@ -139,10 +139,10 @@ namespace cds { namespace intrusive { }; // Declare option-based list - typedef cds::intrusive::MichaelList< cds::gc::PTB + typedef cds::intrusive::MichaelList< cds::gc::DHP ,my_data , typename cds::intrusive::michael_list::make_traits< - cds::intrusive::opt::hook< cds::intrusive::michael_list::base_hook< cds::opt::gc< cds::gc::PTB > > > + cds::intrusive::opt::hook< cds::intrusive::michael_list::base_hook< cds::opt::gc< cds::gc::DHP > > > ,cds::intrusive::opt::compare< my_data_cmp > >::type > option_based_list; diff --git a/cds/intrusive/vyukov_mpmc_cycle_queue.h b/cds/intrusive/vyukov_mpmc_cycle_queue.h index 0147f543..267aa166 100644 --- a/cds/intrusive/vyukov_mpmc_cycle_queue.h +++ b/cds/intrusive/vyukov_mpmc_cycle_queue.h @@ -12,6 +12,8 @@ namespace cds { namespace intrusive { /** @ingroup cds_intrusive_helper */ namespace vyukov_queue { + + /// VyukovMPMCCycleQueue traits struct traits : public cds::container::vyukov_queue::traits { /// The functor used for dispose removed items. Default is \p opt::v::empty_disposer. This option is used only in \p clear() -- 2.34.1