From acd649eea090d7dbce3c340843cee5b8ad8eab4d Mon Sep 17 00:00:00 2001 From: khizmax Date: Sun, 7 Feb 2016 11:35:16 +0300 Subject: [PATCH] Improved docs --- cds/intrusive/impl/lazy_list.h | 10 ++++++++++ cds/intrusive/impl/michael_list.h | 10 ++++++++++ cds/intrusive/lazy_list_rcu.h | 22 ++++++++++++++++------ cds/intrusive/michael_list_rcu.h | 14 ++++++++++++-- 4 files changed, 48 insertions(+), 8 deletions(-) diff --git a/cds/intrusive/impl/lazy_list.h b/cds/intrusive/impl/lazy_list.h index 459111f7..3904251c 100644 --- a/cds/intrusive/impl/lazy_list.h +++ b/cds/intrusive/impl/lazy_list.h @@ -595,6 +595,8 @@ namespace cds { namespace intrusive { is equal to &val . The function returns \p true if success and \p false otherwise. + + \p disposer specified in \p Traits is called for unlinked item. */ bool unlink( value_type& val ) { @@ -606,6 +608,8 @@ namespace cds { namespace intrusive { The function searches an item with key equal to \p key in the list, unlinks it from the list, and returns \p true. If the item with the key equal to \p key is not found the function return \p false. + + \p disposer specified in \p Traits is called for deleted item. */ template bool erase( Q const& key ) @@ -619,6 +623,8 @@ namespace cds { namespace intrusive { but \p pred is used for key comparing. \p Less functor has the interface like \p std::less. \p pred must imply the same element order as the comparator used for building the list. + + \p disposer specified in \p Traits is called for deleted item. */ template bool erase_with( Q const& key, Less pred ) @@ -639,6 +645,8 @@ namespace cds { namespace intrusive { \endcode If \p key is not found the function return \p false. + + \p disposer specified in \p Traits is called for deleted item. */ template bool erase( const Q& key, Func func ) @@ -652,6 +660,8 @@ namespace cds { namespace intrusive { but \p pred is used for key comparing. \p Less functor has the interface like \p std::less. \p pred must imply the same element order as the comparator used for building the list. + + \p disposer specified in \p Traits is called for deleted item. */ template bool erase_with( const Q& key, Less pred, Func func ) diff --git a/cds/intrusive/impl/michael_list.h b/cds/intrusive/impl/michael_list.h index cc156322..c85ca20d 100644 --- a/cds/intrusive/impl/michael_list.h +++ b/cds/intrusive/impl/michael_list.h @@ -604,6 +604,8 @@ namespace cds { namespace intrusive { only if \p val is an item of the list, i.e. the pointer to item found is equal to &val . + \p disposer specified in \p Traits is called for deleted item. + The function returns \p true if success and \p false otherwise. */ bool unlink( value_type& val ) @@ -616,6 +618,8 @@ namespace cds { namespace intrusive { The function searches an item with key equal to \p key in the list, unlinks it from the list, and returns \p true. If \p key is not found the function return \p false. + + \p disposer specified in \p Traits is called for deleted item. */ template bool erase( Q const& key ) @@ -629,6 +633,8 @@ namespace cds { namespace intrusive { but \p pred is used for key comparing. \p Less functor has the interface like \p std::less. \p pred must imply the same element order as the comparator used for building the list. + + \p disposer specified in \p Traits is called for deleted item. */ template bool erase_with( Q const& key, Less pred ) @@ -648,6 +654,8 @@ namespace cds { namespace intrusive { }; \endcode If \p key is not found the function return \p false, \p func is not called. + + \p disposer specified in \p Traits is called for deleted item. */ template bool erase( Q const& key, Func func ) @@ -661,6 +669,8 @@ namespace cds { namespace intrusive { but \p pred is used for key comparing. \p Less functor has the interface like \p std::less. \p pred must imply the same element order as the comparator used for building the list. + + \p disposer specified in \p Traits is called for deleted item. */ template bool erase_with( Q const& key, Less pred, Func f ) diff --git a/cds/intrusive/lazy_list_rcu.h b/cds/intrusive/lazy_list_rcu.h index de34c4f8..cfd5b0a9 100644 --- a/cds/intrusive/lazy_list_rcu.h +++ b/cds/intrusive/lazy_list_rcu.h @@ -517,8 +517,8 @@ namespace cds { namespace intrusive { The function searches the item \p val in the list and unlink it from the list if it is found and it is equal to \p val. - Difference between \ref erase and \p unlink functions: \p erase finds a key - and deletes the item found. \p unlink finds an item by key and deletes it + Difference between \p erase() and \p %unlink() functions: \p %erase() finds a key + and deletes the item found. \p %unlink() finds an item by key and deletes it only if \p val is an item of that list, i.e. the pointer to item found is equal to &val . @@ -527,8 +527,10 @@ namespace cds { namespace intrusive { RCU \p synchronize method can be called. The RCU should not be locked. Note that depending on RCU type used the \ref disposer call can be deferred. - The function can throw cds::urcu::rcu_deadlock exception if deadlock is encountered and - deadlock checking policy is opt::v::rcu_throw_deadlock. + \p disposer specified in \p Traits is called for unlinked item. + + The function can throw \p cds::urcu::rcu_deadlock exception if deadlock is encountered and + deadlock checking policy is \p opt::v::rcu_throw_deadlock. */ bool unlink( value_type& val ) { @@ -544,8 +546,10 @@ namespace cds { namespace intrusive { RCU \p synchronize method can be called. The RCU should not be locked. Note that depending on RCU type used the \ref disposer call can be deferred. + \p disposer specified in \p Traits is called for deleted item. + The function can throw \ref cds_urcu_rcu_deadlock "cds::urcu::rcu_deadlock" exception if deadlock is encountered and - deadlock checking policy is opt::v::rcu_throw_deadlock. + deadlock checking policy is \p opt::v::rcu_throw_deadlock. */ template bool erase( Q const& key ) @@ -559,6 +563,8 @@ namespace cds { namespace intrusive { but \p pred is used for key comparing. \p Less functor has the interface like \p std::less. \p pred must imply the same element order as the comparator used for building the list. + + \p disposer specified in \p Traits is called for deleted item. */ template bool erase_with( Q const& key, Less pred ) @@ -583,8 +589,10 @@ namespace cds { namespace intrusive { RCU \p synchronize method can be called. The RCU should not be locked. Note that depending on RCU type used the \ref disposer call can be deferred. + \p disposer specified in \p Traits is called for deleted item. + The function can throw \ref cds_urcu_rcu_deadlock "cds::urcu::rcu_deadlock" exception if deadlock is encountered and - deadlock checking policy is opt::v::rcu_throw_deadlock. + deadlock checking policy is \p opt::v::rcu_throw_deadlock. */ template bool erase( Q const& key, Func func ) @@ -598,6 +606,8 @@ namespace cds { namespace intrusive { but \p pred is used for key comparing. \p Less functor has the interface like \p std::less. \p pred must imply the same element order as the comparator used for building the list. + + \p disposer specified in \p Traits is called for deleted item. */ template bool erase_with( Q const& key, Less pred, Func func ) diff --git a/cds/intrusive/michael_list_rcu.h b/cds/intrusive/michael_list_rcu.h index 31cc563d..5be6c014 100644 --- a/cds/intrusive/michael_list_rcu.h +++ b/cds/intrusive/michael_list_rcu.h @@ -524,8 +524,8 @@ namespace cds { namespace intrusive { The function searches the item \p val in the list and unlink it from the list if it is found and it is equal to \p val. - Difference between \ref erase and \p unlink functions: \p erase finds a key - and deletes the item found. \p unlink finds an item by key and deletes it + Difference between \p erase() and \p %unlink() functions: \p %erase() finds a key + and deletes the item found. \p %unlink() finds an item by key and deletes it only if \p val is an item of that list, i.e. the pointer to the item found is equal to &val . @@ -534,6 +534,8 @@ namespace cds { namespace intrusive { RCU \p synchronize method can be called. Note that depending on RCU type used the \ref disposer call can be deferred. + \p disposer specified in \p Traits is called for unlinked item. + The function can throw cds::urcu::rcu_deadlock exception if deadlock is encountered and deadlock checking policy is opt::v::rcu_throw_deadlock. */ @@ -551,6 +553,8 @@ namespace cds { namespace intrusive { RCU \p synchronize method can be called. Note that depending on RCU type used the \ref disposer call can be deferred. + \p disposer specified in \p Traits is called for deleted item. + The function can throw \ref cds_urcu_rcu_deadlock "cds::urcu::rcu_deadlock" exception if a deadlock is detected and the deadlock checking policy is \p opt::v::rcu_throw_deadlock. */ @@ -566,6 +570,8 @@ namespace cds { namespace intrusive { but \p pred is used for key comparing. \p Less functor has the interface like \p std::less. \p pred must imply the same element order as the comparator used for building the list. + + \p disposer specified in \p Traits is called for deleted item. */ template bool erase_with( Q const& key, Less pred ) @@ -590,6 +596,8 @@ namespace cds { namespace intrusive { RCU \p synchronize method can be called. Note that depending on RCU type used the \ref disposer call can be deferred. + \p disposer specified in \p Traits is called for deleted item. + The function can throw \ref cds_urcu_rcu_deadlock "cds::urcu::rcu_deadlock" exception if a deadlock is detected and the deadlock checking policy is \p opt::v::rcu_throw_deadlock. */ @@ -605,6 +613,8 @@ namespace cds { namespace intrusive { but \p pred is used for key comparing. \p Less functor has the interface like \p std::less. \p pred must imply the same element order as the comparator used for building the list. + + \p disposer specified in \p Traits is called for deleted item. */ template bool erase_with( Q const& key, Less pred, Func func ) -- 2.34.1