From: khizmax Date: Sat, 25 Oct 2014 18:43:32 +0000 (+0400) Subject: LazyList refactoring X-Git-Tag: v2.0.0~171 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=libcds.git;a=commitdiff_plain;h=78d73eed1f3c4a5424d9f82a09eef9d29bb64166 LazyList refactoring --- diff --git a/cds/container/details/lazy_list_base.h b/cds/container/details/lazy_list_base.h index 9dbe0e2e..583c72f0 100644 --- a/cds/container/details/lazy_list_base.h +++ b/cds/container/details/lazy_list_base.h @@ -13,22 +13,22 @@ namespace cds { namespace container { /** @ingroup cds_nonintrusive_helper */ namespace lazy_list { - /// Lazy list default type traits + /// LazyList traits /** Either \p compare or \p less or both must be specified. */ - struct type_traits + struct traits { /// allocator used to allocate new node typedef CDS_DEFAULT_ALLOCATOR allocator; - /// Key comparison functor + /// Key comparing functor /** No default functor is provided. If the option is not specified, the \p less is used. */ typedef opt::none compare; - /// specifies binary predicate used for key comparison. + /// Specifies binary predicate used for key comparing /** Default is \p std::less. */ @@ -41,33 +41,21 @@ namespace cds { namespace container { typedef cds::lock::Spin lock_type; /// back-off strategy used - /** - If the option is not specified, the cds::backoff::Default is used. - */ typedef cds::backoff::Default back_off; - /// Item counter - /** - The type for item counting feature. - Default is no item counter (\ref atomicity::empty_item_counter) - */ + /// Item counting feature; by default, disabled. Use \p cds::atomicity::item_counter to enable item counting typedef atomicity::empty_item_counter item_counter; - /// Link fields checking feature - /** - Default is \ref intrusive::opt::debug_check_link - */ - static const opt::link_check_type link_checker = opt::debug_check_link; - /// C++ memory ordering model /** - List of available memory ordering see opt::memory_model + Can be \p opt::v::relaxed_ordering (relaxed memory model, the default) + or \p opt::v::sequential_consistent (sequentially consisnent memory model). */ typedef opt::v::relaxed_ordering memory_model; /// RCU deadlock checking policy (only for \ref cds_intrusive_LazyList_rcu "RCU-based LazyList") /** - List of available options see opt::rcu_check_deadlock + List of available options see \p opt::rcu_check_deadlock */ typedef opt::v::rcu_throw_deadlock rcu_check_deadlock; @@ -76,17 +64,24 @@ namespace cds { namespace container { // key accessor (opt::none = internal key type is equal to user key type) typedef opt::none key_accessor; - // for internal use only!!! - typedef opt::none boundary_node_type; - //@endcond }; - /// Metafunction converting option list to traits for LazyList + /// Metafunction converting option list to \p lazy_list::traits /** - This is a wrapper for cds::opt::make_options< type_traits, Options...> - - See \ref LazyList, \ref type_traits, \ref cds::opt::make_options. + \p Options are: + - \p opt::lock_type - lock type for node-level locking. Default \p is cds::lock::Spin. Note that each node + of the list has member of type \p lock_type, therefore, heavy-weighted locking primitive is not + acceptable as candidate for \p lock_type. + - \p opt::compare - key compare functor. No default functor is provided. + If the option is not specified, the \p opt::less is used. + - \p opt::less - specifies binary predicate used for key compare. Default is \p std::less. + - \p opt::back_off - back-off strategy used. If the option is not specified, \p cds::backoff::Default is used. + - \p opt::item_counter - the type of item counting feature. Default is disabled (\p atomicity::empty_item_counter). + To enable item counting use \p atomicity::item_counter. + - \p opt::allocator - the allocator used for creating and freeing list's item. Default is \ref CDS_DEFAULT_ALLOCATOR macro. + - \p opt::memory_model - C++ memory ordering model. Can be \p opt::v::relaxed_ordering (relaxed memory model, the default) + or \p opt::v::sequential_consistent (sequentially consisnent memory model). */ template struct make_traits { @@ -94,7 +89,7 @@ namespace cds { namespace container { typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, Options... >::type + typename cds::opt::find_type_traits< traits, Options... >::type ,Options... >::type type; #endif @@ -104,10 +99,10 @@ namespace cds { namespace container { } // namespace lazy_list // Forward declarations - template + template class LazyList; - template + template class LazyKVList; // Tag for selecting lazy list implementation @@ -115,12 +110,11 @@ namespace cds { namespace container { This struct is empty and it is used only as a tag for selecting LazyList as ordered list implementation in declaration of some classes. - See split_list::type_traits::ordered_list as an example. + See \p split_list::traits::ordered_list as an example. */ struct lazy_list_tag {}; - }} // namespace cds::container diff --git a/cds/container/details/make_lazy_kvlist.h b/cds/container/details/make_lazy_kvlist.h index 870ab5f0..5d6e94be 100644 --- a/cds/container/details/make_lazy_kvlist.h +++ b/cds/container/details/make_lazy_kvlist.h @@ -17,16 +17,16 @@ namespace cds { namespace container { typedef GC gc; typedef K key_type; - typedef T value_type; - typedef std::pair pair_type; + typedef T mapped_type; + typedef std::pair value_type; struct node_type: public intrusive::lazy_list::node { - pair_type m_Data; + value_type m_Data; template node_type( Q const& key ) - : m_Data( key, value_type() ) + : m_Data( key, mapped_type() ) {} template @@ -41,12 +41,12 @@ namespace cds { namespace container { template node_type( Ky&& key, Args&&... args ) - : m_Data( std::forward(key), std::move( value_type( std::forward(args)...))) + : m_Data( std::forward( key ), std::move( mapped_type( std::forward( args )... ) ) ) {} }; - typedef typename original_type_traits::allocator::template rebind::other allocator_type; - typedef cds::details::Allocator< node_type, allocator_type > cxx_allocator; + typedef typename original_type_traits::allocator::template rebind::other allocator_type; + typedef cds::details::Allocator< node_type, allocator_type > cxx_allocator; struct node_deallocator { @@ -70,14 +70,15 @@ namespace cds { namespace container { typedef cds::details::compare_wrapper< node_type, cds::opt::details::make_comparator_from_less, key_field_accessor > type; }; - struct type_traits: public original_type_traits + struct intrusive_traits: public original_type_traits { typedef intrusive::lazy_list::base_hook< opt::gc > hook; - typedef node_deallocator disposer; + typedef node_deallocator disposer; typedef cds::details::compare_wrapper< node_type, key_comparator, key_field_accessor > compare; + static const opt::link_check_type link_checker = cds::intrusive::lazy_list::traits::link_checker; }; - typedef intrusive::LazyList type; + typedef intrusive::LazyList type; }; } // namespace details //@endcond diff --git a/cds/container/details/make_lazy_list.h b/cds/container/details/make_lazy_list.h index 06506c5e..ff5f8c3e 100644 --- a/cds/container/details/make_lazy_list.h +++ b/cds/container/details/make_lazy_list.h @@ -59,15 +59,16 @@ namespace cds { namespace container { typedef cds::details::compare_wrapper< node_type, cds::opt::details::make_comparator_from_less, value_accessor > type; }; - struct type_traits: public original_type_traits + struct intrusive_traits: public original_type_traits { typedef intrusive::lazy_list::base_hook< opt::gc > hook; typedef node_deallocator disposer; + static const opt::link_check_type link_checker = cds::intrusive::lazy_list::traits::link_checker; typedef cds::details::compare_wrapper< node_type, key_comparator, value_accessor > compare; }; - typedef intrusive::LazyList type; + typedef intrusive::LazyList type; }; } // namespace details //@endcond diff --git a/cds/container/impl/lazy_kvlist.h b/cds/container/impl/lazy_kvlist.h index e593b827..e1433a51 100644 --- a/cds/container/impl/lazy_kvlist.h +++ b/cds/container/impl/lazy_kvlist.h @@ -4,7 +4,6 @@ #define __CDS_CONTAINER_IMPL_LAZY_KVLIST_H #include -#include // ref #include namespace cds { namespace container { @@ -21,71 +20,59 @@ namespace cds { namespace container { The complexity of searching is O(N). Template arguments: - - \p GC - garbage collector used - - \p Key - key type of an item stored in the list. It should be copy-constructible - - \p Value - value type stored in the list - - \p Traits - type traits, default is lazy_list::type_traits - - It is possible to declare option-based list with cds::container::lazy_list::make_traits metafunction istead of \p Traits template - argument. For example, the following traits-based declaration of gc::HP lazy list - \code - #include - // Declare comparator for the item - struct my_compare { - int operator ()( int i1, int i2 ) + - \p GC - garbage collector + - \p Key - key type of an item to be stored in the list. It should be copy-constructible + - \p Value - value type to be stored in the list + - \p Traits - type traits, default is \p lazy_list::traits + It is possible to declare option-based list with cds::container::lazy_list::make_traits metafunction istead of \p Traits template + argument. For example, the following traits-based declaration of \p gc::HP lazy list + \code + #include + // Declare comparator for the item + struct my_compare { + int operator ()( int i1, int i2 ) + { + return i1 - i2; + } + }; + + // Declare traits + struct my_traits: public cds::container::lazy_list::traits { - return i1 - i2; - } - }; + typedef my_compare compare; + }; - // Declare type_traits - struct my_traits: public cds::container::lazy_list::type_traits - { - typedef my_compare compare; - }; + // Declare traits-based list + typedef cds::container::LazyKVList< cds::gc::HP, int, int, my_traits > traits_based_list; + \endcode + is equal to the following option-based list + \code + #include + + // my_compare is the same - // Declare traits-based list - typedef cds::container::LazyKVList< cds::gc::HP, int, int, my_traits > traits_based_list; - \endcode - - is equivalent for the following option-based list - \code - #include - - // my_compare is the same - - // Declare option-based list - typedef cds::container::LazyKVList< cds::gc::HP, int, int, - typename cds::container::lazy_list::make_traits< - cds::container::opt::compare< my_compare > // item comparator option - >::type - > option_based_list; - \endcode - - Template argument list \p Options of cds::container::lazy_list::make_traits metafunction are: - - opt::compare - key comparison functor. No default functor is provided. - If the option is not specified, the opt::less is used. - - opt::less - specifies binary predicate used for key comparison. Default is \p std::less. - - opt::back_off - back-off strategy used. If the option is not specified, the cds::backoff::empty is used. - - opt::item_counter - the type of item counting feature. Default is \ref atomicity::empty_item_counter that is no item counting. - - opt::allocator - the allocator used for creating and freeing list's item. Default is \ref CDS_DEFAULT_ALLOCATOR macro. - - opt::memory_model - C++ memory ordering model. Can be opt::v::relaxed_ordering (relaxed memory model, the default) - or opt::v::sequential_consistent (sequentially consisnent memory model). + // Declare option-based list + typedef cds::container::LazyKVList< cds::gc::HP, int, int, + typename cds::container::lazy_list::make_traits< + cds::container::opt::compare< my_compare > // item comparator option + >::type + > option_based_list; + \endcode \par Usage There are different specializations of this template for each garbage collecting schema used. You should include appropriate .h-file depending on GC you are using: - - for gc::HP: \code #include \endcode - - for gc::DHP: \code #include \endcode - - for \ref cds_urcu_desc "RCU": \code #include \endcode - - for gc::nogc: \code #include \endcode + - for \p gc::HP: + - for \p gc::DHP: + - for \ref cds_urcu_desc "RCU": + - for \p gc::nogc: */ template < typename GC, typename Key, typename Value, #ifdef CDS_DOXYGEN_INVOKED - typename Traits = lazy_list::type_traits + typename Traits = lazy_list::traits #else typename Traits #endif @@ -98,36 +85,35 @@ namespace cds { namespace container { #endif { //@cond - typedef details::make_lazy_kvlist< GC, Key, Value, Traits > options; - typedef typename options::type base_class; + typedef details::make_lazy_kvlist< GC, Key, Value, Traits > maker; + typedef typename maker::type base_class; //@endcond public: + typedef GC gc; ///< Garbage collector #ifdef CDS_DOXYGEN_INVOKED typedef Key key_type ; ///< Key type typedef Value mapped_type ; ///< Type of value stored in the list typedef std::pair value_type ; ///< key/value pair stored in the list #else - typedef typename options::key_type key_type; - typedef typename options::value_type mapped_type; - typedef typename options::pair_type value_type; + typedef typename maker::key_type key_type; + typedef typename maker::mapped_type mapped_type; + typedef typename maker::value_type value_type; #endif - - typedef typename base_class::gc gc ; ///< Garbage collector used - typedef typename base_class::back_off back_off ; ///< Back-off strategy used - typedef typename options::allocator_type allocator_type ; ///< Allocator type used for allocate/deallocate the nodes - typedef typename base_class::item_counter item_counter ; ///< Item counting policy used - typedef typename options::key_comparator key_comparator ; ///< key comparison functor - typedef typename base_class::memory_model memory_model ; ///< Memory ordering. See cds::opt::memory_model option + typedef typename base_class::back_off back_off; ///< Back-off strategy + typedef typename maker::allocator_type allocator_type; ///< Allocator type used for allocate/deallocate the nodes + typedef typename base_class::item_counter item_counter; ///< Item counter type + typedef typename maker::key_comparator key_comparator; ///< key comparing functor + typedef typename base_class::memory_model memory_model; ///< Memory ordering. See \p cds::opt::memory_model protected: //@cond - typedef typename base_class::value_type node_type; - typedef typename options::cxx_allocator cxx_allocator; - typedef typename options::node_deallocator node_deallocator; - typedef typename options::type_traits::compare intrusive_key_comparator; + typedef typename base_class::value_type node_type; + typedef typename maker::cxx_allocator cxx_allocator; + typedef typename maker::node_deallocator node_deallocator; + typedef typename maker::intrusive_traits::compare intrusive_key_comparator; - typedef typename base_class::node_type head_type; + typedef typename base_class::node_type head_type; //@endcond public: @@ -169,22 +155,22 @@ namespace cds { namespace container { head_type& head() { - return *base_class::head(); + return base_class::m_Head; } head_type const& head() const { - return *base_class::head(); + return base_class::m_Head; } head_type& tail() { - return *base_class::tail(); + return base_class::m_Tail; } head_type const& tail() const { - return *base_class::tail(); + return base_class::m_Tail; } //@endcond @@ -350,16 +336,10 @@ namespace cds { namespace container { public: /// Default constructor - /** - Initializes empty list - */ LazyKVList() {} - /// List destructor - /** - Clears the list - */ + /// Destructor clears the list ~LazyKVList() { clear(); @@ -413,12 +393,9 @@ namespace cds { namespace container { The argument \p item of user-defined functor \p func is the reference to the list's item inserted. item.second is a reference to item's value that may be changed. - User-defined functor \p func should guarantee that during changing item's value no any other changes - could be made on this list's item by concurrent threads. - The user-defined functor can be passed by reference using \p std::ref - and it is called only if inserting is successful. + The user-defined functor is called only if inserting is successful. - The key_type should be constructible from value of type \p K. + The \p key_type should be constructible from value of type \p K. The function allows to split creating of new item into two part: - create item from \p key; @@ -427,8 +404,6 @@ namespace cds { namespace container { This can be useful if complete initialization of object of \p mapped_type is heavyweight and it is preferable that the initialization should be completed only if inserting is successful. - - @warning See \ref cds_intrusive_item_creating "insert item troubleshooting" */ template bool insert_key( const K& key, Func func ) @@ -451,14 +426,10 @@ namespace cds { namespace container { The operation performs inserting or changing data with lock-free manner. If the \p key not found in the list, then the new item created from \p key - is inserted into the list (note that in this case the \ref key_type should be - copy-constructible from type \p K). + is inserted into the list (note that in this case the \p key_type should be + constructible from type \p K). Otherwise, the functor \p func is called with item found. - The functor \p Func may be a function with signature: - \code - void func( bool bNew, value_type& item ); - \endcode - or a functor: + The functor signature is: \code struct my_functor { void operator()( bool bNew, value_type& item ); @@ -469,15 +440,11 @@ namespace cds { namespace container { - \p bNew - \p true if the item has been inserted, \p false otherwise - \p item - item of the list - The functor may change any fields of the \p item.second that is \ref mapped_type; - however, \p func must guarantee that during changing no any other modifications - could be made on this item by concurrent threads. + The functor may change any fields of the \p item.second that is \p mapped_type. Returns std::pair where \p first is true if operation is successfull, \p second is true if new item has been added or \p false if the item with \p key already is in the list. - - @warning See \ref cds_intrusive_item_creating "insert item troubleshooting" */ template std::pair ensure( const K& key, Func f ) @@ -506,7 +473,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred ) { - return erase_at( head(), key, typename options::template less_wrapper::type() ); + return erase_at( head(), key, typename maker::template less_wrapper::type() ); } /// Deletes \p key from the list @@ -540,7 +507,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred, Func f ) { - return erase_at( head(), key, typename options::template less_wrapper::type(), f ); + return erase_at( head(), key, typename maker::template less_wrapper::type(), f ); } /// Extracts the item from the list with specified \p key @@ -586,7 +553,7 @@ namespace cds { namespace container { template bool extract_with( guarded_ptr& dest, K const& key, Less pred ) { - return extract_at( head(), dest.guard(), key, typename options::template less_wrapper::type() ); + return extract_at( head(), dest.guard(), key, typename maker::template less_wrapper::type() ); } /// Finds the key \p key @@ -610,7 +577,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) { - return find_at( head(), key, typename options::template less_wrapper::type() ); + return find_at( head(), key, typename maker::template less_wrapper::type() ); } /// Finds the key \p key and performs an action with it @@ -649,7 +616,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred, Func f ) { - return find_at( head(), key, typename options::template less_wrapper::type(), f ); + return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } /// Finds \p key and return the item found @@ -697,7 +664,7 @@ namespace cds { namespace container { template bool get_with( guarded_ptr& ptr, K const& key, Less pred ) { - return get_at( head(), ptr.guard(), key, typename options::template less_wrapper::type() ); + return get_at( head(), ptr.guard(), key, typename maker::template less_wrapper::type() ); } /// Checks if the list is empty @@ -711,7 +678,7 @@ namespace cds { namespace container { The value returned depends on opt::item_counter option. For atomicity::empty_item_counter, this function always returns 0. - Warning: even if you use real item counter and it returns 0, this fact is not mean that the list + @note Even if you use real item counter and it returns 0, this fact is not mean that the list is empty. To check list emptyness use \ref empty() method. */ size_t size() const @@ -720,9 +687,6 @@ namespace cds { namespace container { } /// Clears the list - /** - Post-condition: the list is empty - */ void clear() { base_class::clear(); diff --git a/cds/container/impl/lazy_list.h b/cds/container/impl/lazy_list.h index dfed21d8..e44fbe42 100644 --- a/cds/container/impl/lazy_list.h +++ b/cds/container/impl/lazy_list.h @@ -17,90 +17,75 @@ namespace cds { namespace container { Source: - [2005] Steve Heller, Maurice Herlihy, Victor Luchangco, Mark Moir, William N. Scherer III, and Nir Shavit - "A Lazy Concurrent List-Based Set Algorithm" + "A Lazy Concurrent List-Based Set Algorithm" The lazy list is based on an optimistic locking scheme for inserts and removes, eliminating the need to use the equivalent of an atomically markable - reference. It also has a novel wait-free membership \p find operation + reference. It also has a novel wait-free membership \p find() operation that does not need to perform cleanup operations and is more efficient. - It is non-intrusive version of cds::intrusive::LazyList class. + It is non-intrusive version of \p cds::intrusive::LazyList class. Template arguments: - - \p GC - garbage collector used - - \p T - type stored in the list. The type must be default- and copy-constructible. - - \p Traits - type traits, default is lazy_list::type_traits + - \p GC - garbage collector: \p gc::HP, \p gp::DHP + - \p T - type to be stored in the list. + - \p Traits - type traits, default is \p lazy_list::traits. + It is possible to declare option-based list with \p lazy_list::make_traits metafunction istead of \p Traits template + argument. For example, the following traits-based declaration of \p gc::HP lazy list + \code + #include + // Declare comparator for the item + struct my_compare { + int operator ()( int i1, int i2 ) + { + return i1 - i2; + } + }; - Unlike standard container, this implementation does not divide type \p T into key and value part and - may be used as main building block for hash set algorithms. + // Declare type_traits + struct my_traits: public cds::container::lazy_list::traits + { + typedef my_compare compare; + }; - The key is a function (or a part) of type \p T, and this function is specified by Traits::compare functor - or Traits::less predicate. + // Declare traits-based list + typedef cds::container::LazyList< cds::gc::HP, int, my_traits > traits_based_list; + \endcode + is equal to the following option-based list: + \code + #include - LazyKVList is a key-value version of lazy non-intrusive list that is closer to the C++ std library approach. + // my_compare is the same - It is possible to declare option-based list with cds::container::lazy_list::make_traits metafunction istead of \p Traits template - argument. For example, the following traits-based declaration of gc::HP lazy list - \code - #include - // Declare comparator for the item - struct my_compare { - int operator ()( int i1, int i2 ) - { - return i1 - i2; - } - }; + // Declare option-based list + typedef cds::container::LazyList< cds::gc::HP, int, + typename cds::container::lazy_list::make_traits< + cds::container::opt::compare< my_compare > // item comparator option + >::type + > option_based_list; + \endcode - // Declare type_traits - struct my_traits: public cds::container::lazy_list::type_traits - { - typedef my_compare compare; - }; + Unlike standard container, this implementation does not divide type \p T into key and value part and + may be used as main building block for hash set algorithms. + + The key is a function (or a part) of type \p T, and the comparing function is specified by \p Traits::compare functor + or \p Traits::less predicate. - // Declare traits-based list - typedef cds::container::LazyList< cds::gc::HP, int, my_traits > traits_based_list; - \endcode - - is equivalent for the following option-based list - \code - #include - - // my_compare is the same - - // Declare option-based list - typedef cds::container::LazyList< cds::gc::HP, int, - typename cds::container::lazy_list::make_traits< - cds::container::opt::compare< my_compare > // item comparator option - >::type - > option_based_list; - \endcode - - Template argument list \p Options of cds::container::lazy_list::make_traits metafunction are: - - opt::lock_type - lock type for per-node locking. Default is cds::lock::Spin. Note that each node - of the list has member of type \p lock_type, therefore, heavy-weighted locking primitive is not - acceptable as candidate for \p lock_type. - - opt::compare - key compare functor. No default functor is provided. - If the option is not specified, the opt::less is used. - - opt::less - specifies binary predicate used for key compare. Default is \p std::less. - - opt::back_off - back-off strategy used. If the option is not specified, the cds::backoff::empty is used. - - opt::item_counter - the type of item counting feature. Default is \ref atomicity::empty_item_counter that is no item counting. - - opt::allocator - the allocator used for creating and freeing list's item. Default is \ref CDS_DEFAULT_ALLOCATOR macro. - - opt::memory_model - C++ memory ordering model. Can be opt::v::relaxed_ordering (relaxed memory model, the default) - or opt::v::sequential_consistent (sequentially consisnent memory model). + \p LazyKVList is a key-value version of lazy non-intrusive list that is closer to the C++ std library approach. \par Usage There are different specializations of this template for each garbage collecting schema used. You should include appropriate .h-file depending on GC you are using: - - for gc::HP: \code #include \endcode - - for gc::DHP: \code #include \endcode - - for \ref cds_urcu_desc "RCU": \code #include \endcode - - for gc::nogc: \code #include \endcode + - for gc::HP: + - for gc::DHP: + - for \ref cds_urcu_desc "RCU": + - for gc::nogc: */ template < typename GC, typename T, #ifdef CDS_DOXYGEN_INVOKED - typename Traits = lazy_list::type_traits + typename Traits = lazy_list::traits #else typename Traits #endif @@ -113,27 +98,29 @@ namespace cds { namespace container { #endif { //@cond - typedef details::make_lazy_list< GC, T, Traits > options; - typedef typename options::type base_class; + typedef details::make_lazy_list< GC, T, Traits > maker; + typedef typename maker::type base_class; //@endcond public: - typedef T value_type ; ///< Type of value stored in the list - typedef typename base_class::gc gc ; ///< Garbage collector used - typedef typename base_class::back_off back_off ; ///< Back-off strategy used - typedef typename options::allocator_type allocator_type ; ///< Allocator type used for allocate/deallocate the nodes - typedef typename base_class::item_counter item_counter ; ///< Item counting policy used - typedef typename options::key_comparator key_comparator ; ///< key comparison functor - typedef typename base_class::memory_model memory_model ; ///< Memory ordering. See cds::opt::memory_model option + typedef GC gc; ///< Garbage collector used + typedef T value_type; ///< Type of value stored in the list + 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 + typedef typename base_class::item_counter item_counter; ///< Item counting policy used + typedef typename maker::key_comparator key_comparator; ///< key comparison functor + typedef typename base_class::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option protected: //@cond - typedef typename base_class::value_type node_type; - typedef typename options::cxx_allocator cxx_allocator; - typedef typename options::node_deallocator node_deallocator; - typedef typename options::type_traits::compare intrusive_key_comparator; + typedef typename base_class::value_type node_type; + typedef typename maker::cxx_allocator cxx_allocator; + typedef typename maker::node_deallocator node_deallocator; + typedef typename maker::intrusive_traits::compare intrusive_key_comparator; - typedef typename base_class::node_type head_type; + typedef typename base_class::node_type head_type; //@endcond public: @@ -181,22 +168,22 @@ namespace cds { namespace container { head_type& head() { - return *base_class::head(); + return base_class::m_Head; } head_type const& head() const { - return *base_class::head(); + return base_class::m_Head; } head_type& tail() { - return *base_class::tail(); + return base_class::m_Tail; } head_type const& tail() const { - return *base_class::tail(); + return base_class::m_Tail; } //@endcond @@ -335,16 +322,10 @@ namespace cds { namespace container { public: /// Default constructor - /** - Initializes empty list - */ LazyList() {} - /// List desctructor - /** - Clears the list - */ + /// Destructor clears the list ~LazyList() { clear(); @@ -371,26 +352,23 @@ namespace cds { namespace container { /** This function inserts new node with default-constructed value and then it calls \p func functor with signature - \code void func( value_type& itemValue ) ;\endcode + \code void func( value_type& item ) ;\endcode - The argument \p itemValue of user-defined functor \p func is the reference - to the list's item inserted. User-defined functor \p func should guarantee that during changing - item's value no any other changes could be made on this list's item by concurrent threads. - The user-defined functor can be passed by reference using \p std::ref - and it is called only if the inserting is success. + The argument \p item of user-defined functor \p func is the reference + to the list's item inserted. + When \p func is called it has exclusive access to the item. + The user-defined functor is called only if the inserting is success. The type \p Q should contain the complete key of the node. - The object of \ref value_type should be constructible from \p key of type \p Q. + The object of \p value_type should be constructible from \p key of type \p Q. The function allows to split creating of new item into two part: - create item from \p key with initializing key-fields only; - insert new item into the list; - - if inserting is successful, initialize non-key fields of item by calling \p f functor + - if inserting is successful, initialize non-key fields of item by calling \p func functor This can be useful if complete initialization of object of \p value_type is heavyweight and it is preferable that the initialization should be completed only if inserting is successful. - - @warning See \ref cds_intrusive_item_creating "insert item troubleshooting" */ template bool insert( Q const& key, Func func ) @@ -398,7 +376,7 @@ namespace cds { namespace container { return insert_at( head(), key, func ); } - /// Inserts data of type \ref value_type constructed with std::forward(args)... + /// Inserts data of type \p value_type constructed from \p args /** Returns \p true if inserting successful, \p false otherwise. */ @@ -413,31 +391,25 @@ namespace cds { namespace container { The operation performs inserting or changing data with lock-free manner. If the \p key not found in the list, then the new item created from \p key - is inserted into the list. Otherwise, the functor \p func is called with the item found. - The functor \p Func should be a function with signature: - \code - void func( bool bNew, value_type& item, const Q& val ); - \endcode - or a functor: + is inserted into the list. Otherwise, the functor \p f is called with the item found. + \p Func signature is: \code struct my_functor { - void operator()( bool bNew, value_type& item, const Q& val ); + void operator()( bool bNew, value_type& item, const Q& key ); }; \endcode with arguments: - \p bNew - \p true if the item has been inserted, \p false otherwise - - \p item - item of the list - - \p val - argument \p key passed into the \p ensure function + - \p item - an item of the list + - \p key - argument \p key passed into the \p %ensure() function - The functor may change non-key fields of the \p item; however, \p func must guarantee - that during changing no any other modifications could be made on this item by concurrent threads. + The functor may change non-key fields of the \p item. + When \p func is called it has exclusive access to the item. Returns std::pair where \p first is true if operation is successfull, \p second is true if new item has been added or \p false if the item with \p key already is in the list. - - @warning See \ref cds_intrusive_item_creating "insert item troubleshooting" */ template std::pair ensure( Q const& key, Func f ) @@ -470,7 +442,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred ) { - return erase_at( head(), key, typename options::template less_wrapper::type(), [](value_type const&){} ); + return erase_at( head(), key, typename maker::template less_wrapper::type(), [](value_type const&){} ); } /// Deletes \p key from the list @@ -484,7 +456,6 @@ namespace cds { namespace container { void operator()(const value_type& val) { ... } }; \endcode - The functor may be passed by reference with boost:ref Since the key of LazyList's item type \p T is not explicitly specified, template parameter \p Q defines the key type searching in the list. @@ -511,7 +482,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred, Func f ) { - return erase_at( head(), key, typename options::template less_wrapper::type(), f ); + return erase_at( head(), key, typename maker::template less_wrapper::type(), f ); } /// Extracts the item from the list with specified \p key @@ -557,7 +528,7 @@ namespace cds { namespace container { template bool extract_with( guarded_ptr& dest, Q const& key, Less pred ) { - return extract_at( head(), dest.guard(), key, typename options::template less_wrapper::type() ); + return extract_at( head(), dest.guard(), key, typename maker::template less_wrapper::type() ); } /// Finds the key \p key @@ -571,7 +542,7 @@ namespace cds { namespace container { return find_at( head(), key, intrusive_key_comparator() ); } - /// Finds the key \p val using \p pred predicate for searching + /// Finds the key \p key using \p pred predicate for searching /** The function is an analog of \ref cds_nonintrusive_LazyList_hp_find_val "find(Q const&)" but \p pred is used for key comparing. @@ -581,19 +552,19 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) { - return find_at( head(), key, typename options::template less_wrapper::type() ); + return find_at( head(), key, typename maker::template less_wrapper::type() ); } - /// Finds the key \p val and performs an action with it + /// Finds the key \p key and performs an action with it /** \anchor cds_nonintrusive_LazyList_hp_find_func - The function searches an item with key equal to \p val and calls the functor \p f for the item found. + The function searches an item with key equal to \p key and calls the functor \p f for the item found. The interface of \p Func functor is: \code struct functor { - void operator()( value_type& item, Q& val ); + void operator()( value_type& item, Q& key ); }; \endcode - where \p item is the item found, \p val is the find function argument. + where \p item is the item found, \p key is the find function argument. You may pass \p f argument by reference using \p std::ref. @@ -602,18 +573,18 @@ namespace cds { namespace container { The function does not serialize simultaneous access to the list \p item. If such access is possible you must provide your own synchronization schema to exclude unsafe item modifications. - The \p val argument is non-const since it can be used as \p f functor destination i.e., the functor + The \p key argument is non-const since it can be used as \p f functor destination i.e., the functor may modify both arguments. - The function returns \p true if \p val is found, \p false otherwise. + The function returns \p true if \p key is found, \p false otherwise. */ template - bool find( Q& val, Func f ) + bool find( Q& key, Func f ) { - return find_at( head(), val, intrusive_key_comparator(), f ); + return find_at( head(), key, intrusive_key_comparator(), f ); } - /// Finds the key \p val using \p pred predicate for searching + /// Finds the key \p key using \p pred predicate for searching /** The function is an analog of \ref cds_nonintrusive_LazyList_hp_find_func "find(Q&, Func)" but \p pred is used for key comparing. @@ -621,54 +592,17 @@ namespace cds { namespace container { \p pred must imply the same element order as the comparator used for building the list. */ template - bool find_with( Q& val, Less pred, Func f ) + bool find_with( Q& key, Less pred, Func f ) { - return find_at( head(), val, typename options::template less_wrapper::type(), f ); + return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } - /// Finds the key \p val and performs an action with it - /** \anchor cds_nonintrusive_LazyList_hp_find_cfunc - The function searches an item with key equal to \p val and calls the functor \p f for the item found. - The interface of \p Func functor is: - \code - struct functor { - void operator()( value_type& item, Q const& val ); - }; - \endcode - where \p item is the item found, \p val is the find function argument. - - You may pass \p f argument by reference using \p std::ref. - - The function does not serialize simultaneous access to the list \p item. If such access is - possible you must provide your own synchronization schema to exclude unsafe item modifications. - - The function returns \p true if \p val is found, \p false otherwise. - */ - template - bool find( Q const& val, Func f ) - { - return find_at( head(), val, intrusive_key_comparator(), f ); - } - - /// Finds the key \p val using \p pred predicate for searching - /** - The function is an analog of \ref cds_nonintrusive_LazyList_hp_find_cfunc "find(Q&, Func)" - 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. - */ - template - bool find_with( Q const& val, Less pred, Func f ) - { - return find_at( head(), val, typename options::template less_wrapper::type(), f ); - } - - /// Finds the key \p val and return the item found + /// Finds the key \p key and return the item found /** \anchor cds_nonintrusive_LazyList_hp_get - The function searches the item with key equal to \p val + The function searches the item with key equal to \p key and assigns the item found to guarded pointer \p ptr. - The function returns \p true if \p val is found, and \p false otherwise. - If \p val is not found the \p ptr parameter is not changed. + The function returns \p true if \p key is found, and \p false otherwise. + If \p key is not found the \p ptr parameter is not changed. @note Each \p guarded_ptr object uses one GC's guard which can be limited resource. @@ -691,12 +625,12 @@ namespace cds { namespace container { should accept a parameter of type \p Q that can be not the same as \p value_type. */ template - bool get( guarded_ptr& ptr, Q const& val ) + bool get( guarded_ptr& ptr, Q const& key ) { - return get_at( head(), ptr.guard(), val, intrusive_key_comparator() ); + return get_at( head(), ptr.guard(), key, intrusive_key_comparator() ); } - /// Finds the key \p val and return the item found + /// Finds the key \p key and return the item found /** The function is an analog of \ref cds_nonintrusive_LazyList_hp_get "get( guarded_ptr& ptr, Q const&)" but \p pred is used for comparing the keys. @@ -706,12 +640,12 @@ namespace cds { namespace container { \p pred must imply the same element order as the comparator used for building the list. */ template - bool get_with( guarded_ptr& ptr, Q const& val, Less pred ) + bool get_with( guarded_ptr& ptr, Q const& key, Less pred ) { - return get_at( head(), ptr.guard(), val, typename options::template less_wrapper::type() ); + return get_at( head(), ptr.guard(), key, typename maker::template less_wrapper::type() ); } - /// Checks if the list is empty + /// Checks whether the list is empty bool empty() const { return base_class::empty(); @@ -719,10 +653,10 @@ namespace cds { namespace container { /// Returns list's item count /** - The value returned depends on opt::item_counter option. For atomicity::empty_item_counter, + The value returned depends on \p Traits::item_counter type. For \p atomicity::empty_item_counter, this function always returns 0. - Warning: even if you use real item counter and it returns 0, this fact is not mean that the list + @note Even if you use real item counter and it returns 0, this fact is not mean that the list is empty. To check list emptyness use \ref empty() method. */ size_t size() const @@ -731,9 +665,6 @@ namespace cds { namespace container { } /// Clears the list - /** - Post-condition: the list is empty - */ void clear() { base_class::clear(); diff --git a/cds/container/lazy_kvlist_nogc.h b/cds/container/lazy_kvlist_nogc.h index ebe65e4c..e77a5b42 100644 --- a/cds/container/lazy_kvlist_nogc.h +++ b/cds/container/lazy_kvlist_nogc.h @@ -10,44 +10,19 @@ namespace cds { namespace container { - //@cond - namespace details { - - template - struct make_lazy_kvlist_nogc: public make_lazy_kvlist - { - typedef make_lazy_kvlist base_maker; - typedef typename base_maker::node_type node_type; - - struct type_traits: public base_maker::type_traits - { - typedef typename base_maker::node_deallocator disposer; - }; - - typedef intrusive::LazyList type; - }; - - } // namespace details - //@endcond - /// Lazy ordered list (key-value pair, template specialization for gc::nogc) /** @ingroup cds_nonintrusive_list - This specialization is intended for so-called persistent usage when no item + This specialization is append-only list when no item reclamation may be performed. The class does not support deleting of list item. - Usually, ordered single-linked list is used as a building block for the hash table implementation. - The complexity of searching is O(N). - - See \ref cds_nonintrusive_LazyList_gc "LazyList" for description of template parameters. - - The interface of the specialization is a little different. + @copydetails cds_nonintrusive_LazyList_gc */ template < typename Key, typename Value, #ifdef CDS_DOXYGEN_INVOKED - typename Traits = lazy_list::type_traits + typename Traits = lazy_list::traits #else typename Traits #endif @@ -56,39 +31,38 @@ namespace cds { namespace container { #ifdef CDS_DOXYGEN_INVOKED protected intrusive::LazyList< gc::nogc, implementation_defined, Traits > #else - protected details::make_lazy_kvlist_nogc< Key, Value, Traits >::type + protected details::make_lazy_kvlist< cds::gc::nogc, Key, Value, Traits >::type #endif { //@cond - typedef details::make_lazy_kvlist_nogc< Key, Value, Traits > options; - typedef typename options::type base_class; + typedef details::make_lazy_kvlist< cds::gc::nogc, Key, Value, Traits > maker; + typedef typename maker::type base_class; //@endcond public: + typedef cds::gc::nogc gc; ///< Garbage collector #ifdef CDS_DOXYGEN_INVOKED typedef Key key_type ; ///< Key type typedef Value mapped_type ; ///< Type of value stored in the list typedef std::pair value_type ; ///< key/value pair stored in the list #else - typedef typename options::key_type key_type; - typedef typename options::value_type mapped_type; - typedef typename options::pair_type value_type; + typedef typename maker::key_type key_type; + typedef typename maker::mapped_type mapped_type; + typedef typename maker::value_type value_type; #endif - typedef typename base_class::gc gc ; ///< Garbage collector used - typedef typename base_class::back_off back_off ; ///< Back-off strategy used - typedef typename options::allocator_type allocator_type ; ///< Allocator type used for allocate/deallocate the nodes - typedef typename base_class::item_counter item_counter ; ///< Item counting policy used - typedef typename options::key_comparator key_comparator ; ///< key comparison functor - typedef typename base_class::memory_model memory_model ; ///< Memory ordering. See cds::opt::memory_model option + 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 + typedef typename base_class::item_counter item_counter; ///< Item counting policy used + typedef typename maker::key_comparator key_comparator; ///< key comparison functor + typedef typename base_class::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option protected: //@cond - typedef typename base_class::value_type node_type; - typedef typename options::cxx_allocator cxx_allocator; - typedef typename options::node_deallocator node_deallocator; - typedef typename options::type_traits::compare intrusive_key_comparator; - - typedef typename base_class::node_type head_type; + typedef typename base_class::value_type node_type; + typedef typename maker::cxx_allocator cxx_allocator; + typedef typename maker::node_deallocator node_deallocator; + typedef typename maker::intrusive_traits::compare intrusive_key_comparator; + typedef typename base_class::node_type head_type; //@endcond protected: @@ -319,16 +293,10 @@ namespace cds { namespace container { public: /// Default constructor - /** - Initialize empty list - */ LazyKVList() {} - /// List desctructor - /** - Clears the list - */ + /// Desctructor clears the list ~LazyKVList() { clear(); @@ -384,10 +352,7 @@ namespace cds { namespace container { The argument \p item of user-defined functor \p func is the reference to the list's item inserted. item.second is a reference to item's value that may be changed. - User-defined functor \p func should guarantee that during changing item's value no any other changes - could be made on this list's item by concurrent threads. - The user-defined functor can be passed by reference using \p std::ref - and it is called only if the inserting is successful. + The user-defined functor is called only if the inserting is successful. The key_type should be constructible from value of type \p K. @@ -455,7 +420,7 @@ namespace cds { namespace container { template iterator find_with( Q const& key, Less pred ) { - return node_to_iterator( find_at( head(), key, typename options::template less_wrapper::type() ) ); + return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper::type() ) ); } /// Check if the list is empty @@ -469,7 +434,7 @@ namespace cds { namespace container { The value returned depends on opt::item_counter option. For atomicity::empty_item_counter, this function always returns 0. - Warning: even if you use real item counter and it returns 0, this fact is not mean that the list + @note Even if you use real item counter and it returns 0, this fact is not mean that the list is empty. To check list emptyness use \ref empty() method. */ size_t size() const diff --git a/cds/container/lazy_kvlist_rcu.h b/cds/container/lazy_kvlist_rcu.h index 3456a29c..218c2bc3 100644 --- a/cds/container/lazy_kvlist_rcu.h +++ b/cds/container/lazy_kvlist_rcu.h @@ -4,7 +4,6 @@ #define __CDS_CONTAINER_LAZY_KVLIST_RCU_H #include -#include // ref #include #include #include @@ -15,7 +14,7 @@ namespace cds { namespace container { /** @ingroup cds_nonintrusive_list \anchor cds_nonintrusive_LazyKVList_rcu - This is key-value variation of non-intrusive LazyList. + This is key-value variation of non-intrusive \p %LazyList. Like standard container, this implementation split a value stored into two part - constant key and alterable value. @@ -24,67 +23,55 @@ namespace cds { namespace container { Template arguments: - \p RCU - one of \ref cds_urcu_gc "RCU type" - - \p Key - key type of an item stored in the list. It should be copy-constructible - - \p Value - value type stored in the list - - \p Traits - type traits, default is lazy_list::type_traits + - \p Key - key type of an item to be stored in the list. It should be copy-constructible + - \p Value - value type to be stored in the list + - \p Traits - type traits, default is \p lazy_list::traits + It is possible to declare option-based list with \p lazy_list::make_traits metafunction istead of \p Traits template + argument. For example, the following traits-based declaration of \p gc::HP lazy list + \code + #include + #include + // Declare comparator for the item + struct my_compare { + int operator ()( int i1, int i2 ) + { + return i1 - i2; + } + }; - It is possible to declare option-based list with cds::container::lazy_list::make_traits metafunction istead of \p Traits template - argument. For example, the following traits-based declaration of gc::HP lazy list - @note Before including you should include appropriate RCU header file, - see \ref cds_urcu_gc "RCU type" for list of existing RCU class and corresponding header files. - \code - #include - #include - // Declare comparator for the item - struct my_compare { - int operator ()( int i1, int i2 ) + // Declare traits + struct my_traits: public cds::container::lazy_list::traits { - return i1 - i2; - } - }; + typedef my_compare compare; + }; - // Declare type_traits - struct my_traits: public cds::container::lazy_list::type_traits - { - typedef my_compare compare; - }; + // Declare traits-based list + typedef cds::container::LazyKVList< cds::urcu::gc< cds::urcu::general_threaded<> >, int, int, my_traits > traits_based_list; + \endcode + is equal to the following option-based list + \code + #include + #include + + // my_compare is the same + + // Declare option-based list + typedef cds::container::LazyKVList< cds::urcu::gc< cds::urcu::general_threaded<> >, int, int, + typename cds::container::lazy_list::make_traits< + cds::container::opt::compare< my_compare > // item comparator option + >::type + > option_based_list; + \endcode - // Declare traits-based list - typedef cds::container::LazyKVList< cds::urcu::gc< cds::urcu::general_threaded<> >, int, int, my_traits > traits_based_list; - \endcode - - is equivalent for the following option-based list - \code - #include - #include - - // my_compare is the same - - // Declare option-based list - typedef cds::container::LazyKVList< cds::urcu::gc< cds::urcu::general_threaded<> >, int, int, - typename cds::container::lazy_list::make_traits< - cds::container::opt::compare< my_compare > // item comparator option - >::type - > option_based_list; - \endcode - - Template argument list \p Options of cds::container::lazy_list::make_traits metafunction are: - - opt::compare - key comparison functor. No default functor is provided. - If the option is not specified, the opt::less is used. - - opt::less - specifies binary predicate used for key comparison. Default is \p std::less. - - opt::back_off - back-off strategy used. If the option is not specified, the cds::backoff::empty is used. - - opt::item_counter - the type of item counting feature. Default is \ref atomicity::empty_item_counter that is no item counting. - - opt::allocator - the allocator used for creating and freeing list's item. Default is \ref CDS_DEFAULT_ALLOCATOR macro. - - opt::memory_model - C++ memory ordering model. Can be opt::v::relaxed_ordering (relaxed memory model, the default) - or opt::v::sequential_consistent (sequentially consisnent memory model). - - opt::rcu_check_deadlock - a deadlock checking policy. Default is opt::v::rcu_throw_deadlock + @note Before including you should include appropriate RCU header file, + see \ref cds_urcu_gc "RCU type" for list of existing RCU class and corresponding header files. */ template < typename RCU, typename Key, typename Value, #ifdef CDS_DOXYGEN_INVOKED - typename Traits = lazy_list::type_traits + typename Traits = lazy_list::traits #else typename Traits #endif @@ -97,27 +84,26 @@ namespace cds { namespace container { #endif { //@cond - typedef details::make_lazy_kvlist< cds::urcu::gc, Key, Value, Traits > options; - typedef typename options::type base_class; + typedef details::make_lazy_kvlist< cds::urcu::gc, Key, Value, Traits > maker; + typedef typename maker::type base_class; //@endcond public: + typedef cds::urcu::gc gc; ///< Garbage collector #ifdef CDS_DOXYGEN_INVOKED typedef Key key_type ; ///< Key type typedef Value mapped_type ; ///< Type of value stored in the list typedef std::pair value_type ; ///< key/value pair stored in the list #else - typedef typename options::key_type key_type; - typedef typename options::value_type mapped_type; - typedef typename options::pair_type value_type; + typedef typename maker::key_type key_type; + typedef typename maker::mapped_type mapped_type; + typedef typename maker::value_type value_type; #endif - - typedef typename base_class::gc gc ; ///< Garbage collector used - typedef typename base_class::back_off back_off ; ///< Back-off strategy used - typedef typename options::allocator_type allocator_type ; ///< Allocator type used for allocate/deallocate the nodes - typedef typename base_class::item_counter item_counter ; ///< Item counting policy used - typedef typename options::key_comparator key_comparator ; ///< key comparison functor - typedef typename base_class::memory_model memory_model ; ///< Memory ordering. See cds::opt::memory_model option + 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 + typedef typename base_class::item_counter item_counter; ///< Item counting policy used + typedef typename maker::key_comparator key_comparator; ///< key comparison functor + typedef typename base_class::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option typedef typename base_class::rcu_check_deadlock rcu_check_deadlock ; ///< RCU deadlock checking policy typedef typename gc::scoped_lock rcu_lock ; ///< RCU scoped lock @@ -125,17 +111,17 @@ namespace cds { namespace container { protected: //@cond - typedef typename base_class::value_type node_type; - typedef typename options::cxx_allocator cxx_allocator; - typedef typename options::node_deallocator node_deallocator; - typedef typename options::type_traits::compare intrusive_key_comparator; + typedef typename base_class::value_type node_type; + typedef typename maker::cxx_allocator cxx_allocator; + typedef typename maker::node_deallocator node_deallocator; + typedef typename maker::intrusive_traits::compare intrusive_key_comparator; - typedef typename base_class::node_type head_type; + typedef typename base_class::node_type head_type; //@endcond public: /// pointer to extracted node - typedef cds::urcu::exempt_ptr< gc, node_type, value_type, typename options::type_traits::disposer, + typedef cds::urcu::exempt_ptr< gc, node_type, value_type, typename maker::intrusive_traits::disposer, cds::urcu::details::conventional_exempt_pair_cast > exempt_ptr; @@ -331,16 +317,10 @@ namespace cds { namespace container { public: /// Default constructor - /** - Initializes empty list - */ LazyKVList() {} - /// List destructor - /** - Clears the list - */ + /// Destructor clears the list ~LazyKVList() { clear(); @@ -352,7 +332,7 @@ namespace cds { namespace container { Preconditions: - The \ref key_type should be constructible from value of type \p K. - In trivial case, \p K is equal to \ref key_type. + In trivial case, \p K is equal to \p key_type. - The \ref mapped_type should be default-constructible. The function makes RCU lock internally. @@ -370,8 +350,8 @@ namespace cds { namespace container { The function creates a node with \p key and value \p val, and then inserts the node created into the list. Preconditions: - - The \ref key_type should be constructible from \p key of type \p K. - - The \ref mapped_type should be constructible from \p val of type \p V. + - The \p key_type should be constructible from \p key of type \p K. + - The \p mapped_type should be constructible from \p val of type \p V. The function makes RCU lock internally. @@ -395,10 +375,7 @@ namespace cds { namespace container { The argument \p item of user-defined functor \p func is the reference to the list's item inserted. item.second is a reference to item's value that may be changed. - User-defined functor \p func should guarantee that during changing item's value no any other changes - could be made on this list's item by concurrent threads. - The user-defined functor can be passed by reference using \p std::ref - and it is called only if inserting is successful. + The user-defined functor is called only if inserting is successful. The key_type should be constructible from value of type \p K. @@ -420,7 +397,7 @@ namespace cds { namespace container { return insert_key_at( head(), key, func ); } - /// Inserts data of type \ref mapped_type constructed with std::forward(args)... + /// Inserts data of type \p mapped_type constructed from \p args /** Returns \p true if inserting successful, \p false otherwise. @@ -455,9 +432,7 @@ namespace cds { namespace container { - \p bNew - \p true if the item has been inserted, \p false otherwise - \p item - item of the list - The functor may change any fields of the \p item.second that is \ref mapped_type; - however, \p func must guarantee that during changing no any other modifications - could be made on this item by concurrent threads. + The functor may change any fields of the \p item.second of type \p mapped_type. The function makes RCU lock internally. @@ -496,7 +471,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred ) { - return erase_at( head(), key, typename options::template less_wrapper::type() ); + return erase_at( head(), key, typename maker::template less_wrapper::type() ); } /// Deletes \p key from the list @@ -532,7 +507,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred, Func f ) { - return erase_at( head(), key, typename options::template less_wrapper::type(), f ); + return erase_at( head(), key, typename maker::template less_wrapper::type(), f ); } /// Extracts an item from the list @@ -591,7 +566,7 @@ namespace cds { namespace container { template bool extract_with( exempt_ptr& dest, K const& key, Less pred ) { - dest = extract_at( head(), key, typename options::template less_wrapper::type() ); + dest = extract_at( head(), key, typename maker::template less_wrapper::type() ); return !dest.empty(); } @@ -618,7 +593,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) const { - return find_at( head(), key, typename options::template less_wrapper::type() ); + return find_at( head(), key, typename maker::template less_wrapper::type() ); } /// Finds the key \p key and performs an action with it @@ -659,7 +634,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred, Func f ) const { - return find_at( head(), key, typename options::template less_wrapper::type(), f ); + return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } /// Finds \p key and return the item found @@ -707,7 +682,7 @@ namespace cds { namespace container { template value_type * get_with( K const& key, Less pred ) const { - return get_at( head(), key, typename options::template less_wrapper::type()); + return get_at( head(), key, typename maker::template less_wrapper::type()); } /// Checks if the list is empty @@ -721,7 +696,7 @@ namespace cds { namespace container { The value returned depends on opt::item_counter option. For atomicity::empty_item_counter, this function always returns 0. - Warning: even if you use real item counter and it returns 0, this fact is not mean that the list + @note Even if you use real item counter and it returns 0, this fact is not mean that the list is empty. To check list emptyness use \ref empty() method. */ size_t size() const @@ -730,9 +705,6 @@ namespace cds { namespace container { } /// Clears the list - /** - Post-condition: the list is empty - */ void clear() { base_class::clear(); diff --git a/cds/container/lazy_list_nogc.h b/cds/container/lazy_list_nogc.h index 96394f17..eac78730 100644 --- a/cds/container/lazy_list_nogc.h +++ b/cds/container/lazy_list_nogc.h @@ -10,68 +10,52 @@ namespace cds { namespace container { - //@cond - namespace details { - - template - struct make_lazy_list_nogc: public make_lazy_list - { - typedef make_lazy_list base_maker; - typedef typename base_maker::node_type node_type; - - struct type_traits: public base_maker::type_traits - { - typedef typename base_maker::node_deallocator disposer; - }; - - typedef intrusive::LazyList type; - }; - - } // namespace details - //@endcond - /// Lazy ordered single-linked list (template specialization for gc::nogc) /** @ingroup cds_nonintrusive_list \anchor cds_nonintrusive_LazyList_nogc - This specialization is intended for so-called persistent usage when no item + This specialization is so-called append-only when no item reclamation may be performed. The class does not support deleting of list item. - Usually, ordered single-linked list is used as a building block for the hash table implementation. - The complexity of searching is O(N). - - See \ref cds_nonintrusive_LazyList_gc "LazyList" for description of template parameters. - - The interface of the specialization is a little different. + @copydetails cds_nonintrusive_LazyList_gc */ - template - class LazyList: + template < + typename T, +#ifdef CDS_DOXYGEN_INVOKED + typename Traits = lazy_list::traits +#else + typename Traits +#endif + > + class LazyList: #ifdef CDS_DOXYGEN_INVOKED protected intrusive::LazyList< gc::nogc, T, Traits > #else - protected details::make_lazy_list_nogc< T, Traits >::type + protected details::make_lazy_list< cds::gc::nogc, T, Traits >::type #endif { //@cond - typedef details::make_lazy_list_nogc< T, Traits > options; - typedef typename options::type base_class; + typedef details::make_lazy_list< cds::gc::nogc, T, Traits > maker; + typedef typename maker::type base_class; //@endcond public: - typedef T value_type ; ///< Type of value stored in the list - typedef typename base_class::gc gc ; ///< Garbage collector used - typedef typename base_class::back_off back_off ; ///< Back-off strategy used - typedef typename options::allocator_type allocator_type ; ///< Allocator type used for allocate/deallocate the nodes - typedef typename base_class::item_counter item_counter ; ///< Item counting policy used - typedef typename options::key_comparator key_comparator ; ///< key comparison functor - typedef typename base_class::memory_model memory_model ; ///< Memory ordering. See cds::opt::memory_model option + typedef cds::gc::nogc gc; ///< Garbage collector + typedef T value_type; ///< Type of value stored in the list + 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 + typedef typename base_class::item_counter item_counter; ///< Item counting policy used + typedef typename maker::key_comparator key_comparator; ///< key comparison functor + typedef typename base_class::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option protected: //@cond - typedef typename base_class::value_type node_type; - typedef typename options::cxx_allocator cxx_allocator; - typedef typename options::node_deallocator node_deallocator; - typedef typename options::type_traits::compare intrusive_key_comparator; + typedef typename base_class::value_type node_type; + typedef typename maker::cxx_allocator cxx_allocator; + typedef typename maker::node_deallocator node_deallocator; + typedef typename maker::intrusive_traits::compare intrusive_key_comparator; typedef typename base_class::node_type head_type; //@endcond @@ -274,16 +258,10 @@ namespace cds { namespace container { public: /// Default constructor - /** - Initialize empty list - */ LazyList() {} - /// List desctructor - /** - Clears the list - */ + /// Desctructor clears the list ~LazyList() { clear(); @@ -302,7 +280,7 @@ namespace cds { namespace container { return node_to_iterator( insert_at( head(), val ) ); } - /// Inserts data of type \ref value_type constructed with std::forward(args)... + /// Inserts data of type \p value_type created from \p args /** Return an iterator pointing to inserted item if success \ref end() otherwise */ @@ -318,7 +296,7 @@ namespace cds { namespace container { Otherwise, the function returns an iterator that points to item found. Returns std::pair where \p first is an iterator pointing to - item found or inserted, \p second is true if new item has been added or \p false if the item + item found or inserted, \p second is \p true if new item has been added or \p false if the item already is in the list. */ template @@ -350,7 +328,7 @@ namespace cds { namespace container { template iterator find_with( Q const& key, Less pred ) { - return node_to_iterator( find_at( head(), key, typename options::template less_wrapper::type() )); + return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper::type() )); } /// Check if the list is empty @@ -361,10 +339,10 @@ namespace cds { namespace container { /// Returns list's item count /** - The value returned depends on opt::item_counter option. For atomicity::empty_item_counter, + The value returned depends on \p Traits::item_counter type. For \p atomicity::empty_item_counter, this function always returns 0. - Warning: even if you use real item counter and it returns 0, this fact is not mean that the list + @note Even if you use real item counter and it returns 0, this fact is not mean that the list is empty. To check list emptyness use \ref empty() method. */ size_t size() const @@ -373,9 +351,6 @@ namespace cds { namespace container { } /// Clears the list - /** - Post-condition: the list is empty - */ void clear() { base_class::clear(); diff --git a/cds/container/lazy_list_rcu.h b/cds/container/lazy_list_rcu.h index 5e694a7b..a7fedd31 100644 --- a/cds/container/lazy_list_rcu.h +++ b/cds/container/lazy_list_rcu.h @@ -27,17 +27,53 @@ namespace cds { namespace container { reference. It also has a novel wait-free membership \p find operation that does not need to perform cleanup operations and is more efficient. - It is non-intrusive version of cds::intrusive::LazyList class + It is non-intrusive version of \p cds::intrusive::LazyList class Template arguments: - \p RCU - one of \ref cds_urcu_gc "RCU type" - - \p T - type stored in the list. The type must be default- and copy-constructible. - - \p Traits - type traits, default is lazy_list::type_traits + - \p T - type to be stored in the list. + - \p Traits - type traits, default is lazy_list::traits + It is possible to declare option-based list with cds::container::lazy_list::make_traits metafunction istead of \p Traits template + argument. For example, the following traits-based declaration of \p gc::HP lazy list + \code + #include + #include + // Declare comparator for the item + struct my_compare { + int operator ()( int i1, int i2 ) + { + return i1 - i2; + } + }; + + // Declare traits + struct my_traits: public cds::container::lazy_list::traits + { + typedef my_compare compare; + }; + + // Declare traits-based list + typedef cds::container::LazyList< cds::urcu::gc< cds::urcu::general_instant<> >, int, my_traits > traits_based_list; + \endcode + is equal to the following option-based list + \code + #include + #include + + // my_compare is the same + + // Declare option-based list + typedef cds::container::LazyList< cds::urcu::gc< cds::urcu::general_instant<> >, int, + typename cds::container::lazy_list::make_traits< + cds::container::opt::compare< my_compare > // item comparator option + >::type + > option_based_list; + \endcode The implementation does not divide type \p T into key and value part and - may be used as main building block for hash set containers. - The key is a function (or a part) of type \p T, and this function is specified by Traits::compare functor - or Traits::less predicate + may be used as main building block for some hash set containers. + The key is a function (or a part) of type \p T, and this function is specified by \p Traits::compare functor + or \p Traits::less predicate \ref cds_nonintrusive_LazyKVList_rcu "LazyKVList" is a key-value version of lazy non-intrusive list that is closer to the C++ std library approach. @@ -45,64 +81,12 @@ namespace cds { namespace container { @note Before including you should include appropriate RCU header file, see \ref cds_urcu_gc "RCU type" for list of existing RCU class and corresponding header files. - - It is possible to declare option-based list with cds::container::lazy_list::make_traits metafunction istead of \p Traits template - argument. For example, the following traits-based declaration of gc::HP lazy list - \code - #include - #include - // Declare comparator for the item - struct my_compare { - int operator ()( int i1, int i2 ) - { - return i1 - i2; - } - }; - - // Declare type_traits - struct my_traits: public cds::container::lazy_list::type_traits - { - typedef my_compare compare; - }; - - // Declare traits-based list - typedef cds::container::LazyList< cds::urcu::gc< cds::urcu::general_instant<> >, int, my_traits > traits_based_list; - \endcode - - is equivalent for the following option-based list - \code - #include - #include - - // my_compare is the same - - // Declare option-based list - typedef cds::container::LazyList< cds::urcu::gc< cds::urcu::general_instant<> >, int, - typename cds::container::lazy_list::make_traits< - cds::container::opt::compare< my_compare > // item comparator option - >::type - > option_based_list; - \endcode - - Template argument list \p Options of cds::container::lazy_list::make_traits metafunction are: - - opt::lock_type - lock type for per-node locking. Default is cds::lock::Spin. Note that each node - of the list has member of type \p lock_type, therefore, heavy-weighted locking primitive is not - acceptable as candidate for \p lock_type. - - opt::compare - key comparison functor. No default functor is provided. - If the option is not specified, the opt::less is used. - - opt::less - specifies binary predicate used for key comparison. Default is \p std::less. - - opt::back_off - back-off strategy used. If the option is not specified, the cds::backoff::empty is used. - - opt::item_counter - the type of item counting feature. Default is \ref atomicity::empty_item_counter that is no item counting. - - opt::allocator - the allocator used for creating and freeing list's item. Default is \ref CDS_DEFAULT_ALLOCATOR macro. - - opt::memory_model - C++ memory ordering model. Can be opt::v::relaxed_ordering (relaxed memory model, the default) - or opt::v::sequential_consistent (sequentially consisnent memory model). - - opt::rcu_check_deadlock - a deadlock checking policy. Default is opt::v::rcu_throw_deadlock */ template < typename RCU, typename T, #ifdef CDS_DOXYGEN_INVOKED - typename Traits = lazy_list::type_traits + typename Traits = lazy_list::traits #else typename Traits #endif @@ -120,16 +104,18 @@ namespace cds { namespace container { //@endcond public: - typedef T value_type ; ///< Type of value stored in the list - typedef typename base_class::gc gc ; ///< Garbage collector used - 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 - typedef typename base_class::item_counter item_counter ; ///< Item counting policy used - typedef typename maker::key_comparator key_comparator ; ///< key compare functor - typedef typename base_class::memory_model memory_model ; ///< Memory ordering. See cds::opt::memory_model option - typedef typename base_class::rcu_check_deadlock rcu_check_deadlock ; ///< Deadlock checking policy - - typedef typename gc::scoped_lock rcu_lock ; ///< RCU scoped lock + typedef cds::urcu::gc gc; ///< Garbage collector + typedef T value_type; ///< Type of value stored in the list + typedef Traits traits; ///< List traits + + typedef typename base_class::back_off back_off; ///< Back-off strategy + typedef typename maker::allocator_type allocator_type; ///< Allocator type used for allocate/deallocate the nodes + typedef typename base_class::item_counter item_counter; ///< Item counting policy used + typedef typename maker::key_comparator key_comparator; ///< key compare functor + typedef typename base_class::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option + typedef typename base_class::rcu_check_deadlock rcu_check_deadlock; ///< Deadlock checking policy + + typedef typename gc::scoped_lock rcu_lock ; ///< RCU scoped lock static CDS_CONSTEXPR const bool c_bExtractLockExternal = base_class::c_bExtractLockExternal; ///< Group of \p extract_xxx functions require external locking protected: @@ -137,13 +123,13 @@ namespace cds { namespace container { typedef typename base_class::value_type node_type; typedef typename maker::cxx_allocator cxx_allocator; typedef typename maker::node_deallocator node_deallocator; - typedef typename maker::type_traits::compare intrusive_key_comparator; + typedef typename maker::intrusive_traits::compare intrusive_key_comparator; - typedef typename base_class::node_type head_type; + typedef typename base_class::node_type head_type; //@endcond public: - typedef cds::urcu::exempt_ptr< gc, node_type, value_type, typename maker::type_traits::disposer > exempt_ptr; ///< pointer to extracted node + typedef cds::urcu::exempt_ptr< gc, node_type, value_type, typename maker::intrusive_traits::disposer > exempt_ptr; ///< pointer to extracted node private: //@cond @@ -327,16 +313,10 @@ namespace cds { namespace container { public: /// Default constructor - /** - Initializes empty list - */ LazyList() {} - /// List desctructor - /** - Clears the list - */ + /// Desctructor clears the list ~LazyList() { clear(); @@ -348,8 +328,8 @@ namespace cds { namespace container { and then inserts the node created into the list. The type \p Q should contain as minimum the complete key of the node. - The object of \ref value_type should be constructible from \p val of type \p Q. - In trivial case, \p Q is equal to \ref value_type. + The object of \p value_type should be constructible from \p val of type \p Q. + In trivial case, \p Q is equal to \p value_type. The function makes RCU lock internally. @@ -368,10 +348,8 @@ namespace cds { namespace container { \code void func( value_type& itemValue ) ;\endcode The argument \p itemValue of user-defined functor \p func is the reference - to the list's item inserted. User-defined functor \p func should guarantee that during changing - item's value no any other changes could be made on this list's item by concurrent threads. - The user-defined functor can be passed by reference using \p std::ref - and it is called only if the inserting is success. + to the list's item inserted. + The user-defined functor is called only if the inserting is success. The type \p Q should contain the complete key of the node. The object of \ref value_type should be constructible from \p key of type \p Q. @@ -385,8 +363,6 @@ namespace cds { namespace container { it is preferable that the initialization should be completed only if inserting is successful. The function makes RCU lock internally. - - @warning See \ref cds_intrusive_item_creating "insert item troubleshooting" */ template bool insert( Q const& key, Func func ) @@ -394,7 +370,7 @@ namespace cds { namespace container { return insert_at( head(), key, func ); } - /// Inserts data of type \ref value_type constructed with std::forward(args)... + /// Inserts data of type \p value_type constructed from \p args /** Returns \p true if inserting successful, \p false otherwise. @@ -412,11 +388,7 @@ namespace cds { namespace container { If the \p key not found in the list, then the new item created from \p key is inserted into the list. Otherwise, the functor \p func is called with the item found. - The functor \p Func should be a function with signature: - \code - void func( bool bNew, value_type& item, Q const& val ); - \endcode - or a functor: + The functor \p Func signature is: \code struct my_functor { void operator()( bool bNew, value_type& item, Q const& val ); @@ -428,10 +400,7 @@ namespace cds { namespace container { - \p item - item of the list - \p val - argument \p key passed into the \p ensure function - The functor may change non-key fields of the \p item; however, \p func must guarantee - that during changing no any other modifications could be made on this item by concurrent threads. - - You may pass \p func argument by reference using \p std::ref + The functor may change non-key fields of the \p item. The function applies RCU lock internally. @@ -592,7 +561,7 @@ namespace cds { namespace container { return find_at( head(), key, intrusive_key_comparator() ); } - /// Finds the key \p val using \p pred predicate for searching + /// Finds the key \p key using \p pred predicate for searching /** The function is an analog of \ref cds_nonintrusive_LazyList_rcu_find_val "find(Q const&)" but \p pred is used for key comparing. @@ -605,16 +574,16 @@ namespace cds { namespace container { return find_at( head(), key, typename maker::template less_wrapper::type() ); } - /// Finds the key \p val and performs an action with it + /// Finds the key \p key and performs an action with it /** \anchor cds_nonintrusive_LazyList_rcu_find_func - The function searches an item with key equal to \p val and calls the functor \p f for the item found. + The function searches an item with key equal to \p key and calls the functor \p f for the item found. The interface of \p Func functor is: \code struct functor { - void operator()( value_type& item, Q& val ); + void operator()( value_type& item, Q& key ); }; \endcode - where \p item is the item found, \p val is the \p find() function argument. + where \p item is the item found, \p key is the \p find() function argument. You may pass \p f argument by reference using \p std::ref. @@ -623,20 +592,20 @@ namespace cds { namespace container { The function does not serialize simultaneous access to the list \p item. If such access is possible you must provide your own synchronization schema to exclude unsafe item modifications. - The \p val argument is non-const since it can be used as \p f functor destination i.e., the functor + The \p key argument is non-const since it can be used as \p f functor destination i.e., the functor may modify both arguments. The function makes RCU lock internally. - The function returns \p true if \p val is found, \p false otherwise. + The function returns \p true if \p key is found, \p false otherwise. */ template - bool find( Q& val, Func f ) const + bool find( Q& key, Func f ) const { - return find_at( head(), val, intrusive_key_comparator(), f ); + return find_at( head(), key, intrusive_key_comparator(), f ); } - /// Finds the key \p val using \p pred predicate for searching + /// Finds the key \p key using \p pred predicate for searching /** The function is an analog of \ref cds_nonintrusive_LazyList_rcu_find_func "find(Q&, Func)" but \p pred is used for key comparing. @@ -644,54 +613,15 @@ namespace cds { namespace container { \p pred must imply the same element order as the comparator used for building the list. */ template - bool find_with( Q& val, Less pred, Func f ) const - { - return find_at( head(), val, typename maker::template less_wrapper::type(), f ); - } - - /// Finds the key \p val and performs an action with it - /** \anchor cds_nonintrusive_LazyList_rcu_find_cfunc - The function searches an item with key equal to \p val and calls the functor \p f for the item found. - The interface of \p Func functor is: - \code - struct functor { - void operator()( value_type& item, Q const& val ); - }; - \endcode - where \p item is the item found, \p val is the find function argument. - - You may pass \p f argument by reference using \p std::ref. - - The function does not serialize simultaneous access to the list \p item. If such access is - possible you must provide your own synchronization schema to exclude unsafe item modifications. - - The function makes RCU lock internally. - - The function returns \p true if \p val is found, \p false otherwise. - */ - template - bool find( Q const& val, Func f ) const - { - return find_at( head(), val, intrusive_key_comparator(), f ); - } - - /// Finds the key \p val using \p pred predicate for searching - /** - The function is an analog of \ref cds_nonintrusive_LazyList_rcu_find_cfunc "find(Q const&, Func)" - 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. - */ - template - bool find_with( Q const& val, Less pred, Func f ) const + bool find_with( Q& key, Less pred, Func f ) const { - return find_at( head(), val, typename maker::template less_wrapper::type(), f ); + return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } - /// Finds the key \p val and return the item found + /// Finds the key \p key and return the item found /** \anchor cds_nonintrusive_LazyList_rcu_get - The function searches the item with key equal to \p val and returns the pointer to item found. - If \p val is not found it returns \p nullptr. + The function searches the item with key equal to \p key and returns the pointer to item found. + If \p key is not found it returns \p nullptr. Note the compare functor should accept a parameter of type \p Q that can be not the same as \p value_type. @@ -716,12 +646,12 @@ namespace cds { namespace container { \endcode */ template - value_type * get( Q const& val ) const + value_type * get( Q const& key ) const { - return get_at( head(), val, intrusive_key_comparator()); + return get_at( head(), key, intrusive_key_comparator()); } - /// Finds the key \p val and return the item found + /// Finds the key \p key and return the item found /** The function is an analog of \ref cds_nonintrusive_LazyList_rcu_get "get(Q const&)" but \p pred is used for comparing the keys. @@ -731,9 +661,9 @@ namespace cds { namespace container { \p pred must imply the same element order as the comparator used for building the list. */ template - value_type * get_with( Q const& val, Less pred ) const + value_type * get_with( Q const& key, Less pred ) const { - return get_at( head(), val, typename maker::template less_wrapper::type()); + return get_at( head(), key, typename maker::template less_wrapper::type()); } /// Checks if the list is empty @@ -744,10 +674,10 @@ namespace cds { namespace container { /// Returns list's item count /** - The value returned depends on opt::item_counter option. For atomicity::empty_item_counter, + The value returned depends on \p Traits::item_counter type. For \p atomicity::empty_item_counter, this function always returns 0. - Warning: even if you use real item counter and it returns 0, this fact is not mean that the list + @note Even if you use real item counter and it returns 0, this fact is not mean that the list is empty. To check list emptyness use \ref empty() method. */ size_t size() const @@ -756,9 +686,6 @@ namespace cds { namespace container { } /// Clears the list - /** - Post-condition: the list is empty - */ void clear() { base_class::clear(); diff --git a/cds/intrusive/impl/lazy_list.h b/cds/intrusive/impl/lazy_list.h index fd19d277..72d7e2ab 100644 --- a/cds/intrusive/impl/lazy_list.h +++ b/cds/intrusive/impl/lazy_list.h @@ -517,7 +517,8 @@ namespace cds { namespace intrusive { void func( value_type& val ); \endcode where \p val is the item inserted. - While the functor \p f is working the item \p val is locked. + While the functor \p f is called the item \p val is locked so + the functor has an exclusive access to the item. The user-defined functor is called only if the inserting is success. */ template @@ -544,7 +545,8 @@ namespace cds { namespace intrusive { refer to the same thing. The functor may change non-key fields of the \p item. - While the functor \p f is working the item \p item is locked. + While the functor \p f is working the item \p item is locked, + so \p f has exclusive access to the item. Returns std::pair where \p first is \p true if operation is successfull, \p second is \p true if new item has been added or \p false if the item with \p key diff --git a/cds/intrusive/lazy_list_nogc.h b/cds/intrusive/lazy_list_nogc.h index c73efe16..ad710ce9 100644 --- a/cds/intrusive/lazy_list_nogc.h +++ b/cds/intrusive/lazy_list_nogc.h @@ -72,7 +72,7 @@ namespace cds { namespace intrusive { # else typedef typename opt::details::make_comparator< value_type, traits >::type key_comparator; # endif - + typedef typename traits::back_off back_off; ///< Back-off strategy typedef typename traits::disposer disposer; ///< disposer typedef typename get_node_traits< value_type, node_type, hook>::type node_traits; ///< node traits typedef typename lazy_list::get_link_checker< node_type, traits::link_checker >::type link_checker; ///< link checker diff --git a/tests/test-hdr/ordered_list/hdr_lazy_dhp.cpp b/tests/test-hdr/ordered_list/hdr_lazy_dhp.cpp index 2e14d9f5..2ea4838e 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_dhp.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_dhp.cpp @@ -5,7 +5,7 @@ namespace ordlist { namespace { - struct DHP_cmp_traits: public cc::lazy_list::type_traits + struct DHP_cmp_traits: public cc::lazy_list::traits { typedef LazyListTestHeader::cmp compare; }; @@ -27,7 +27,7 @@ namespace ordlist { } namespace { - struct DHP_less_traits: public cc::lazy_list::type_traits + struct DHP_less_traits: public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; }; @@ -49,7 +49,7 @@ namespace ordlist { } namespace { - struct DHP_cmpmix_traits: public cc::lazy_list::type_traits + struct DHP_cmpmix_traits: public cc::lazy_list::traits { typedef LazyListTestHeader::cmp compare; typedef LazyListTestHeader::lt less; @@ -73,7 +73,7 @@ namespace ordlist { } namespace { - struct DHP_ic_traits: public cc::lazy_list::type_traits + struct DHP_ic_traits: public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/test-hdr/ordered_list/hdr_lazy_hp.cpp b/tests/test-hdr/ordered_list/hdr_lazy_hp.cpp index a73eaf2c..441ee6f1 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_hp.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_hp.cpp @@ -5,9 +5,9 @@ namespace ordlist { namespace { - struct HP_cmp_traits: public cc::lazy_list::type_traits + struct HP_cmp_traits: public cc::lazy_list::traits { - typedef LazyListTestHeader::cmp compare; + typedef LazyListTestHeader::cmp compare; }; } @@ -28,7 +28,7 @@ namespace ordlist { } namespace { - struct HP_less_traits: public cc::lazy_list::type_traits + struct HP_less_traits: public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; }; @@ -50,7 +50,7 @@ namespace ordlist { } namespace { - struct HP_cmpmix_traits: public cc::lazy_list::type_traits + struct HP_cmpmix_traits: public cc::lazy_list::traits { typedef LazyListTestHeader::cmp compare; typedef LazyListTestHeader::lt less; @@ -74,7 +74,7 @@ namespace ordlist { } namespace { - struct HP_ic_traits: public cc::lazy_list::type_traits + struct HP_ic_traits: public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/test-hdr/ordered_list/hdr_lazy_kv_dhp.cpp b/tests/test-hdr/ordered_list/hdr_lazy_kv_dhp.cpp index 9ecd60eb..c3929e55 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_kv_dhp.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_kv_dhp.cpp @@ -5,7 +5,7 @@ namespace ordlist { namespace { - struct DHP_cmp_traits: public cc::lazy_list::type_traits + struct DHP_cmp_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; }; @@ -27,7 +27,7 @@ namespace ordlist { } namespace { - struct DHP_less_traits: public cc::lazy_list::type_traits + struct DHP_less_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; }; @@ -49,7 +49,7 @@ namespace ordlist { } namespace { - struct DHP_cmpmix_traits: public cc::lazy_list::type_traits + struct DHP_cmpmix_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; typedef LazyKVListTestHeader::lt less; @@ -73,7 +73,7 @@ namespace ordlist { } namespace { - struct DHP_ic_traits: public cc::lazy_list::type_traits + struct DHP_ic_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/test-hdr/ordered_list/hdr_lazy_kv_hp.cpp b/tests/test-hdr/ordered_list/hdr_lazy_kv_hp.cpp index f158356b..03fd8190 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_kv_hp.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_kv_hp.cpp @@ -5,7 +5,7 @@ namespace ordlist { namespace { - struct HP_cmp_traits: public cc::lazy_list::type_traits + struct HP_cmp_traits: public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; }; @@ -30,7 +30,7 @@ namespace ordlist { } namespace { - struct HP_less_traits: public cc::lazy_list::type_traits + struct HP_less_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; }; @@ -52,7 +52,7 @@ namespace ordlist { } namespace { - struct HP_cmpmix_traits: public cc::lazy_list::type_traits + struct HP_cmpmix_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; typedef LazyKVListTestHeader::lt less; @@ -76,7 +76,7 @@ namespace ordlist { } namespace { - struct HP_ic_traits: public cc::lazy_list::type_traits + struct HP_ic_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/test-hdr/ordered_list/hdr_lazy_kv_nogc.cpp b/tests/test-hdr/ordered_list/hdr_lazy_kv_nogc.cpp index 4057af64..65e803b5 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_kv_nogc.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_kv_nogc.cpp @@ -5,7 +5,7 @@ namespace ordlist { namespace { - struct NOGC_cmp_traits: public cc::lazy_list::type_traits + struct NOGC_cmp_traits: public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; }; @@ -30,7 +30,7 @@ namespace ordlist { } namespace { - struct NOGC_less_traits: public cc::lazy_list::type_traits + struct NOGC_less_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; }; @@ -52,7 +52,7 @@ namespace ordlist { } namespace { - struct NOGC_cmpmix_traits: public cc::lazy_list::type_traits + struct NOGC_cmpmix_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; typedef LazyKVListTestHeader::lt less; @@ -76,7 +76,7 @@ namespace ordlist { } namespace { - struct NOGC_ic_traits: public cc::lazy_list::type_traits + struct NOGC_ic_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_gpb.cpp b/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_gpb.cpp index 438dcd16..c8892120 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_gpb.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_gpb.cpp @@ -8,7 +8,7 @@ namespace ordlist { namespace { typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - struct RCU_GPB_cmp_traits: public cc::lazy_list::type_traits + struct RCU_GPB_cmp_traits: public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; }; @@ -30,7 +30,7 @@ namespace ordlist { } namespace { - struct RCU_GPB_less_traits: public cc::lazy_list::type_traits + struct RCU_GPB_less_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; }; @@ -52,7 +52,7 @@ namespace ordlist { } namespace { - struct RCU_GPB_cmpmix_traits: public cc::lazy_list::type_traits + struct RCU_GPB_cmpmix_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; typedef LazyKVListTestHeader::lt less; @@ -76,7 +76,7 @@ namespace ordlist { } namespace { - struct RCU_GPB_ic_traits: public cc::lazy_list::type_traits + struct RCU_GPB_ic_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_gpi.cpp b/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_gpi.cpp index 09233203..8da769bd 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_gpi.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_gpi.cpp @@ -8,7 +8,7 @@ namespace ordlist { namespace { typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - struct RCU_GPI_cmp_traits: public cc::lazy_list::type_traits + struct RCU_GPI_cmp_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; }; @@ -30,7 +30,7 @@ namespace ordlist { } namespace { - struct RCU_GPI_less_traits: public cc::lazy_list::type_traits + struct RCU_GPI_less_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; }; @@ -52,7 +52,7 @@ namespace ordlist { } namespace { - struct RCU_GPI_cmpmix_traits: public cc::lazy_list::type_traits + struct RCU_GPI_cmpmix_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; typedef LazyKVListTestHeader::lt less; @@ -76,7 +76,7 @@ namespace ordlist { } namespace { - struct RCU_GPI_ic_traits: public cc::lazy_list::type_traits + struct RCU_GPI_ic_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_gpt.cpp b/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_gpt.cpp index 03af9283..d9414797 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_gpt.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_gpt.cpp @@ -8,7 +8,7 @@ namespace ordlist { namespace { typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - struct RCU_GPT_cmp_traits: public cc::lazy_list::type_traits + struct RCU_GPT_cmp_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; }; @@ -30,7 +30,7 @@ namespace ordlist { } namespace { - struct RCU_GPT_less_traits: public cc::lazy_list::type_traits + struct RCU_GPT_less_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; }; @@ -52,7 +52,7 @@ namespace ordlist { } namespace { - struct RCU_GPT_cmpmix_traits: public cc::lazy_list::type_traits + struct RCU_GPT_cmpmix_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; typedef LazyKVListTestHeader::lt less; @@ -76,7 +76,7 @@ namespace ordlist { } namespace { - struct RCU_GPT_ic_traits: public cc::lazy_list::type_traits + struct RCU_GPT_ic_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_shb.cpp b/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_shb.cpp index b32ed9c9..221d6faa 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_shb.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_shb.cpp @@ -9,7 +9,7 @@ namespace ordlist { namespace { typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - struct RCU_SHB_cmp_traits: public cc::lazy_list::type_traits + struct RCU_SHB_cmp_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; }; @@ -36,7 +36,7 @@ namespace ordlist { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED namespace { - struct RCU_SHB_less_traits: public cc::lazy_list::type_traits + struct RCU_SHB_less_traits: public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; }; @@ -63,7 +63,7 @@ namespace ordlist { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED namespace { - struct RCU_SHB_cmpmix_traits: public cc::lazy_list::type_traits + struct RCU_SHB_cmpmix_traits: public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; typedef LazyKVListTestHeader::lt less; @@ -92,7 +92,7 @@ namespace ordlist { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED namespace { - struct RCU_SHB_ic_traits: public cc::lazy_list::type_traits + struct RCU_SHB_ic_traits: public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_sht.cpp b/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_sht.cpp index 53b80aa0..a0a0f45f 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_sht.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_kv_rcu_sht.cpp @@ -9,7 +9,7 @@ namespace ordlist { namespace { typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - struct RCU_SHT_cmp_traits: public cc::lazy_list::type_traits + struct RCU_SHT_cmp_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; }; @@ -35,7 +35,7 @@ namespace ordlist { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED namespace { - struct RCU_SHT_less_traits: public cc::lazy_list::type_traits + struct RCU_SHT_less_traits : public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; }; @@ -61,7 +61,7 @@ namespace ordlist { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED namespace { - struct RCU_SHT_cmpmix_traits: public cc::lazy_list::type_traits + struct RCU_SHT_cmpmix_traits: public cc::lazy_list::traits { typedef LazyKVListTestHeader::cmp compare; typedef LazyKVListTestHeader::lt less; @@ -89,7 +89,7 @@ namespace ordlist { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED namespace { - struct RCU_SHT_ic_traits: public cc::lazy_list::type_traits + struct RCU_SHT_ic_traits: public cc::lazy_list::traits { typedef LazyKVListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/test-hdr/ordered_list/hdr_lazy_nogc.cpp b/tests/test-hdr/ordered_list/hdr_lazy_nogc.cpp index 9b313a0a..6f7313ce 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_nogc.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_nogc.cpp @@ -5,7 +5,7 @@ namespace ordlist { namespace { - struct NOGC_cmp_traits: public cc::lazy_list::type_traits + struct NOGC_cmp_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::cmp compare; }; @@ -27,7 +27,7 @@ namespace ordlist { } namespace { - struct NOGC_less_traits: public cc::lazy_list::type_traits + struct NOGC_less_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; }; @@ -49,7 +49,7 @@ namespace ordlist { } namespace { - struct NOGC_cmpmix_traits: public cc::lazy_list::type_traits + struct NOGC_cmpmix_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::cmp compare; typedef LazyListTestHeader::lt less; @@ -73,7 +73,7 @@ namespace ordlist { } namespace { - struct NOGC_ic_traits: public cc::lazy_list::type_traits + struct NOGC_ic_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/test-hdr/ordered_list/hdr_lazy_rcu_gpb.cpp b/tests/test-hdr/ordered_list/hdr_lazy_rcu_gpb.cpp index 0c1c4a0f..f640f9b4 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_rcu_gpb.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_rcu_gpb.cpp @@ -8,7 +8,7 @@ namespace ordlist { namespace { typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type; - struct RCU_GPB_cmp_traits: public cc::lazy_list::type_traits + struct RCU_GPB_cmp_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::cmp compare; }; @@ -30,7 +30,7 @@ namespace ordlist { } namespace { - struct RCU_GPB_less_traits: public cc::lazy_list::type_traits + struct RCU_GPB_less_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; }; @@ -52,7 +52,7 @@ namespace ordlist { } namespace { - struct RCU_GPB_cmpmix_traits: public cc::lazy_list::type_traits + struct RCU_GPB_cmpmix_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::cmp compare; typedef LazyListTestHeader::lt less; @@ -76,7 +76,7 @@ namespace ordlist { } namespace { - struct RCU_GPB_ic_traits: public cc::lazy_list::type_traits + struct RCU_GPB_ic_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/test-hdr/ordered_list/hdr_lazy_rcu_gpi.cpp b/tests/test-hdr/ordered_list/hdr_lazy_rcu_gpi.cpp index 7106e62d..cf6cf19a 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_rcu_gpi.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_rcu_gpi.cpp @@ -8,7 +8,7 @@ namespace ordlist { namespace { typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type; - struct RCU_GPI_cmp_traits: public cc::lazy_list::type_traits + struct RCU_GPI_cmp_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::cmp compare; }; @@ -30,7 +30,7 @@ namespace ordlist { } namespace { - struct RCU_GPI_less_traits: public cc::lazy_list::type_traits + struct RCU_GPI_less_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; }; @@ -52,7 +52,7 @@ namespace ordlist { } namespace { - struct RCU_GPI_cmpmix_traits: public cc::lazy_list::type_traits + struct RCU_GPI_cmpmix_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::cmp compare; typedef LazyListTestHeader::lt less; @@ -76,7 +76,7 @@ namespace ordlist { } namespace { - struct RCU_GPI_ic_traits: public cc::lazy_list::type_traits + struct RCU_GPI_ic_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/test-hdr/ordered_list/hdr_lazy_rcu_gpt.cpp b/tests/test-hdr/ordered_list/hdr_lazy_rcu_gpt.cpp index 0ab8fda8..a92ec111 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_rcu_gpt.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_rcu_gpt.cpp @@ -8,7 +8,7 @@ namespace ordlist { namespace { typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type; - struct RCU_GPT_cmp_traits: public cc::lazy_list::type_traits + struct RCU_GPT_cmp_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::cmp compare; }; @@ -30,7 +30,7 @@ namespace ordlist { } namespace { - struct RCU_GPT_less_traits: public cc::lazy_list::type_traits + struct RCU_GPT_less_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; }; @@ -52,7 +52,7 @@ namespace ordlist { } namespace { - struct RCU_GPT_cmpmix_traits: public cc::lazy_list::type_traits + struct RCU_GPT_cmpmix_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::cmp compare; typedef LazyListTestHeader::lt less; @@ -76,7 +76,7 @@ namespace ordlist { } namespace { - struct RCU_GPT_ic_traits: public cc::lazy_list::type_traits + struct RCU_GPT_ic_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/test-hdr/ordered_list/hdr_lazy_rcu_shb.cpp b/tests/test-hdr/ordered_list/hdr_lazy_rcu_shb.cpp index 44c3739e..712c4860 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_rcu_shb.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_rcu_shb.cpp @@ -9,7 +9,7 @@ namespace ordlist { namespace { typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type; - struct RCU_SHB_cmp_traits: public cc::lazy_list::type_traits + struct RCU_SHB_cmp_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::cmp compare; }; @@ -35,7 +35,7 @@ namespace ordlist { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED namespace { - struct RCU_SHB_less_traits: public cc::lazy_list::type_traits + struct RCU_SHB_less_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; }; @@ -61,7 +61,7 @@ namespace ordlist { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED namespace { - struct RCU_SHB_cmpmix_traits: public cc::lazy_list::type_traits + struct RCU_SHB_cmpmix_traits: public cc::lazy_list::traits { typedef LazyListTestHeader::cmp compare; typedef LazyListTestHeader::lt less; @@ -89,7 +89,7 @@ namespace ordlist { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED namespace { - struct RCU_SHB_ic_traits: public cc::lazy_list::type_traits + struct RCU_SHB_ic_traits: public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/test-hdr/ordered_list/hdr_lazy_rcu_sht.cpp b/tests/test-hdr/ordered_list/hdr_lazy_rcu_sht.cpp index a83171f7..013d1b99 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_rcu_sht.cpp +++ b/tests/test-hdr/ordered_list/hdr_lazy_rcu_sht.cpp @@ -9,7 +9,7 @@ namespace ordlist { namespace { typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type; - struct RCU_SHT_cmp_traits: public cc::lazy_list::type_traits + struct RCU_SHT_cmp_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::cmp compare; }; @@ -35,7 +35,7 @@ namespace ordlist { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED namespace { - struct RCU_SHT_less_traits: public cc::lazy_list::type_traits + struct RCU_SHT_less_traits : public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; }; @@ -61,7 +61,7 @@ namespace ordlist { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED namespace { - struct RCU_SHT_cmpmix_traits: public cc::lazy_list::type_traits + struct RCU_SHT_cmpmix_traits: public cc::lazy_list::traits { typedef LazyListTestHeader::cmp compare; typedef LazyListTestHeader::lt less; @@ -89,7 +89,7 @@ namespace ordlist { #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED namespace { - struct RCU_SHT_ic_traits: public cc::lazy_list::type_traits + struct RCU_SHT_ic_traits: public cc::lazy_list::traits { typedef LazyListTestHeader::lt less; typedef cds::atomicity::item_counter item_counter; diff --git a/tests/unit/map2/map_types.h b/tests/unit/map2/map_types.h index d7946509..82dc9cc0 100644 --- a/tests/unit/map2/map_types.h +++ b/tests/unit/map2/map_types.h @@ -217,332 +217,105 @@ namespace map2 { // *************************************************************************** // MichaelKVList - typedef cc::MichaelKVList< cds::gc::HP, Key, Value, - typename cc::michael_list::make_traits< + struct traits_MichaelList_cmp_stdAlloc : + public cc::michael_list::make_traits< co::compare< compare > >::type - > MichaelList_HP_cmp_stdAlloc; - - typedef cc::MichaelKVList< cds::gc::HP, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_HP_cmp_stdAlloc_seqcst; - - typedef cc::MichaelKVList< cds::gc::HP, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_HP_cmp_michaelAlloc; - - typedef cc::MichaelKVList< cds::gc::HP, Key, Value, - typename cc::michael_list::make_traits< - co::less< less > - >::type - > MichaelList_HP_less_stdAlloc; - - typedef cc::MichaelKVList< cds::gc::HP, Key, Value, - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_HP_less_stdAlloc_seqcst; - - typedef cc::MichaelKVList< cds::gc::HP, Key, Value, - typename cc::michael_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_HP_less_michaelAlloc; - - typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare > - >::type - > MichaelList_DHP_cmp_stdAlloc; - - typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_DHP_cmp_stdAlloc_seqcst; - - typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_DHP_cmp_michaelAlloc; - - typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, - typename cc::michael_list::make_traits< - co::less< less > - >::type - > MichaelList_DHP_less_stdAlloc; - - typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_DHP_less_stdAlloc_seqcst; - - typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, - typename cc::michael_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_DHP_less_michaelAlloc; - - // RCU - typedef cc::MichaelKVList< rcu_gpi, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare > - >::type - > MichaelList_RCU_GPI_cmp_stdAlloc; - - typedef cc::MichaelKVList< rcu_gpi, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_GPI_cmp_stdAlloc_seqcst; - - typedef cc::MichaelKVList< rcu_gpi, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_GPI_cmp_michaelAlloc; - - typedef cc::MichaelKVList< rcu_gpi, Key, Value, - typename cc::michael_list::make_traits< - co::less< less > - >::type - > MichaelList_RCU_GPI_less_stdAlloc; - - typedef cc::MichaelKVList< rcu_gpi, Key, Value, - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_GPI_less_stdAlloc_seqcst; - - typedef cc::MichaelKVList< rcu_gpi, Key, Value, - typename cc::michael_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_GPI_less_michaelAlloc; - - // - typedef cc::MichaelKVList< rcu_gpb, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare > - >::type - > MichaelList_RCU_GPB_cmp_stdAlloc; - - typedef cc::MichaelKVList< rcu_gpb, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_GPB_cmp_stdAlloc_seqcst; - - typedef cc::MichaelKVList< rcu_gpb, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_GPB_cmp_michaelAlloc; - - typedef cc::MichaelKVList< rcu_gpb, Key, Value, - typename cc::michael_list::make_traits< - co::less< less > - >::type - > MichaelList_RCU_GPB_less_stdAlloc; - - typedef cc::MichaelKVList< rcu_gpb, Key, Value, - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_GPB_less_stdAlloc_seqcst; - - typedef cc::MichaelKVList< rcu_gpb, Key, Value, - typename cc::michael_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_GPB_less_michaelAlloc; - - // - typedef cc::MichaelKVList< rcu_gpt, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare > - >::type - > MichaelList_RCU_GPT_cmp_stdAlloc; - - typedef cc::MichaelKVList< rcu_gpt, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_GPT_cmp_stdAlloc_seqcst; - - typedef cc::MichaelKVList< rcu_gpt, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_GPT_cmp_michaelAlloc; - - typedef cc::MichaelKVList< rcu_gpt, Key, Value, - typename cc::michael_list::make_traits< - co::less< less > - >::type - > MichaelList_RCU_GPT_less_stdAlloc; - - typedef cc::MichaelKVList< rcu_gpt, Key, Value, - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_GPT_less_stdAlloc_seqcst; - - typedef cc::MichaelKVList< rcu_gpt, Key, Value, - typename cc::michael_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_GPT_less_michaelAlloc; - + {}; + typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_HP_cmp_stdAlloc; + typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_DHP_cmp_stdAlloc; + typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_NOGC_cmp_stdAlloc; + typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_GPI_cmp_stdAlloc; + typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_GPB_cmp_stdAlloc; + typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_GPT_cmp_stdAlloc; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelKVList< rcu_shb, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare > - >::type - > MichaelList_RCU_SHB_cmp_stdAlloc; - - typedef cc::MichaelKVList< rcu_shb, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_SHB_cmp_stdAlloc_seqcst; - - typedef cc::MichaelKVList< rcu_shb, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_SHB_cmp_michaelAlloc; - - typedef cc::MichaelKVList< rcu_shb, Key, Value, - typename cc::michael_list::make_traits< - co::less< less > - >::type - > MichaelList_RCU_SHB_less_stdAlloc; - - typedef cc::MichaelKVList< rcu_shb, Key, Value, - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_SHB_less_stdAlloc_seqcst; - - typedef cc::MichaelKVList< rcu_shb, Key, Value, - typename cc::michael_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_SHB_less_michaelAlloc; - - // - typedef cc::MichaelKVList< rcu_sht, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare > - >::type - > MichaelList_RCU_SHT_cmp_stdAlloc; - - typedef cc::MichaelKVList< rcu_sht, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_SHT_cmp_stdAlloc_seqcst; - - typedef cc::MichaelKVList< rcu_sht, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_SHT_cmp_michaelAlloc; - - typedef cc::MichaelKVList< rcu_sht, Key, Value, - typename cc::michael_list::make_traits< - co::less< less > - >::type - > MichaelList_RCU_SHT_less_stdAlloc; - - typedef cc::MichaelKVList< rcu_sht, Key, Value, - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_SHT_less_stdAlloc_seqcst; - - typedef cc::MichaelKVList< rcu_sht, Key, Value, - typename cc::michael_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_SHT_less_michaelAlloc; + typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_SHB_cmp_stdAlloc; + typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_SHT_cmp_stdAlloc; #endif - // gc::nogc - typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, - typename cc::michael_list::make_traits< - co::compare< compare > - >::type - > MichaelList_NOGC_cmp_stdAlloc; - - typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, - typename cc::michael_list::make_traits< + struct traits_MichaelList_cmp_stdAlloc_seqcst : + public cc::michael_list::make_traits< co::compare< compare > ,co::memory_model< co::v::sequential_consistent > >::type - > MichaelList_NOGC_cmp_stdAlloc_seqcst; + {}; + typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_HP_cmp_stdAlloc_seqcst; + typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_DHP_cmp_stdAlloc_seqcst; + typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_NOGC_cmp_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_GPI_cmp_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_GPB_cmp_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_GPT_cmp_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_SHB_cmp_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_SHT_cmp_stdAlloc_seqcst; +#endif - typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, - typename cc::michael_list::make_traits< + struct traits_MichaelList_cmp_michaelAlloc : + public cc::michael_list::make_traits< co::compare< compare >, co::allocator< memory::MichaelAllocator > >::type - > MichaelList_NOGC_cmp_michaelAlloc; + {}; + typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_HP_cmp_michaelAlloc; + typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_DHP_cmp_michaelAlloc; + typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_NOGC_cmp_michaelAlloc; + typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_GPI_cmp_michaelAlloc; + typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_GPB_cmp_michaelAlloc; + typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_GPT_cmp_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_SHB_cmp_michaelAlloc; + typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_SHT_cmp_michaelAlloc; +#endif - typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, - typename cc::michael_list::make_traits< + struct traits_MichaelList_less_stdAlloc : + public cc::michael_list::make_traits< co::less< less > >::type - > MichaelList_NOGC_less_stdAlloc; + {}; + typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_HP_less_stdAlloc; + typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_DHP_less_stdAlloc; + typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_NOGC_less_stdAlloc; + typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_GPI_less_stdAlloc; + typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_GPB_less_stdAlloc; + typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_GPT_less_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_SHB_less_stdAlloc; + typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_less_stdAlloc > MichaelList_RCU_SHT_less_stdAlloc; +#endif - typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, - typename cc::michael_list::make_traits< + struct traits_MichaelList_less_stdAlloc_seqcst : + public cc::michael_list::make_traits< co::less< less > ,co::memory_model< co::v::sequential_consistent > >::type - > MichaelList_NOGC_less_stdAlloc_seqcst; + {}; + typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_HP_less_stdAlloc_seqcst; + typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_DHP_less_stdAlloc_seqcst; + typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_NOGC_less_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_GPI_less_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_GPB_less_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_GPT_less_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_SHB_less_stdAlloc_seqcst; + typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_SHT_less_stdAlloc_seqcst; +#endif - typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, - typename cc::michael_list::make_traits< + struct traits_MichaelList_less_michaelAlloc : + public cc::michael_list::make_traits< co::less< less >, co::allocator< memory::MichaelAllocator > >::type - > MichaelList_NOGC_less_michaelAlloc; + {}; + typedef cc::MichaelKVList< cds::gc::HP, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_HP_less_michaelAlloc; + typedef cc::MichaelKVList< cds::gc::DHP, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_DHP_less_michaelAlloc; + typedef cc::MichaelKVList< cds::gc::nogc, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_NOGC_less_michaelAlloc; + typedef cc::MichaelKVList< rcu_gpi, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_GPI_less_michaelAlloc; + typedef cc::MichaelKVList< rcu_gpb, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_GPB_less_michaelAlloc; + typedef cc::MichaelKVList< rcu_gpt, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_GPT_less_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelKVList< rcu_shb, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_SHB_less_michaelAlloc; + typedef cc::MichaelKVList< rcu_sht, Key, Value, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_SHT_less_michaelAlloc; +#endif template class NogcMapWrapper: public Base @@ -658,965 +431,250 @@ namespace map2 { // *************************************************************************** // MichaelHashMap based on MichaelKVList - typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_cmp_stdAlloc, - typename cc::michael_map::make_traits< + struct traits_MichaelMap_hash : + public cc::michael_map::make_traits< co::hash< hash > >::type - > MichaelMap_HP_cmp_stdAlloc; + {}; + typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_HP_cmp_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_DHP_cmp_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_NOGC_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPI_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPB_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPT_cmp_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_SHB_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_SHT_cmp_stdAlloc; +#endif - typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_HP_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_HP_less_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_DHP_less_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_NOGC_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPI_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPB_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_GPT_less_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_SHB_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_RCU_SHT_less_stdAlloc; +#endif - typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_HP_cmp_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_HP_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_DHP_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_NOGC_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPI_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPB_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPT_cmp_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHB_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHT_cmp_stdAlloc_seqcst; +#endif - typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_HP_less_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_HP_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_DHP_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_NOGC_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPI_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPB_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_GPT_less_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHB_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_RCU_SHT_less_stdAlloc_seqcst; +#endif - typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_HP_less_stdAlloc_seqcst; + struct traits_MichaelSet_michaelAlloc : + public traits_MichaelMap_hash + { + typedef cds::memory::MichaelAllocator allocator; + }; + typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_HP_cmp_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_DHP_cmp_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_NOGC_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPI_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPB_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPT_cmp_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_SHB_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_SHT_cmp_michaelAlloc; +#endif + typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_HP_less_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_DHP_less_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_NOGC_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPI_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPB_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_GPT_less_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_SHB_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_RCU_SHT_less_michaelAlloc; +#endif - typedef cc::MichaelHashMap< cds::gc::HP, MichaelList_HP_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_HP_less_michaelAlloc; + // *************************************************************************** + // LazyKVList - typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_cmp_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > + struct traits_LazyList_cmp_stdAlloc : + public cc::lazy_list::make_traits< + co::compare< compare > >::type - > MichaelMap_DHP_cmp_stdAlloc; + {}; + typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_HP_cmp_stdAlloc; + typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_DHP_cmp_stdAlloc; + typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_NOGC_cmp_stdAlloc; + typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_GPI_cmp_stdAlloc; + typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_GPB_cmp_stdAlloc; + typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_GPT_cmp_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_SHB_cmp_stdAlloc; + typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_cmp_stdAlloc > LazyList_RCU_SHT_cmp_stdAlloc; +#endif - typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > + struct traits_LazyList_cmp_stdAlloc_seqcst : + public cc::lazy_list::make_traits< + co::compare< compare > + ,co::memory_model< co::v::sequential_consistent > >::type - > MichaelMap_DHP_cmp_stdAlloc_seqcst; + {}; + typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_HP_cmp_stdAlloc_seqcst; + typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_DHP_cmp_stdAlloc_seqcst; + typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_NOGC_cmp_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_GPI_cmp_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_GPB_cmp_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_GPT_cmp_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_SHB_cmp_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_SHT_cmp_stdAlloc_seqcst; +#endif - typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, + struct traits_LazyList_cmp_michaelAlloc : + public cc::lazy_list::make_traits< + co::compare< compare >, co::allocator< memory::MichaelAllocator > >::type - > MichaelMap_DHP_cmp_michaelAlloc; - - typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > + {}; + typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_HP_cmp_michaelAlloc; + typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_DHP_cmp_michaelAlloc; + typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_NOGC _cmp_michaelAlloc; + typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_GPI_cmp_michaelAlloc; + typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_GPB_cmp_michaelAlloc; + typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_GPT_cmp_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_SHB_cmp_michaelAlloc; + typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_SHT_cmp_michaelAlloc; +#endif + struct traits_LazyList_less_stdAlloc : + public cc::lazy_list::make_traits< + co::less< less > >::type - > MichaelMap_DHP_less_stdAlloc; + {}; + typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_less_stdAlloc > LazyList_HP_less_stdAlloc; + typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_less_stdAlloc > LazyList_DHP_less_stdAlloc; + typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_less_stdAlloc > LazyList_NOGC_less_stdAlloc; + typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_GPI_less_stdAlloc; + typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_GPB_less_stdAlloc; + typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_GPT_less_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_SHB_less_stdAlloc; + typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_less_stdAlloc > LazyList_RCU_SHT_less_stdAlloc; +#endif - typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > + struct traits_LazyList_less_stdAlloc_seqcst : + public cc::lazy_list::make_traits< + co::less< less > + ,co::memory_model< co::v::sequential_consistent > >::type - > MichaelMap_DHP_less_stdAlloc_seqcst; + {}; + typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_HP_less_stdAlloc_seqcst; + typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_DHP_less_stdAlloc_seqcst; + typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_NOGC_less_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_GPI_less_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_GPB_less_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_GPT_less_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_SHB_less_stdAlloc_seqcst; + typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_SHT_less_stdAlloc_seqcst; +#endif - typedef cc::MichaelHashMap< cds::gc::DHP, MichaelList_DHP_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, + struct traits_LazyList_less_michaelAlloc : + public cc::lazy_list::make_traits< + co::less< less >, co::allocator< memory::MichaelAllocator > >::type - > MichaelMap_DHP_less_michaelAlloc; - - //RCU - typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_cmp_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_GPI_cmp_stdAlloc; + {}; + typedef cc::LazyKVList< cds::gc::HP, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_HP_less_michaelAlloc; + typedef cc::LazyKVList< cds::gc::DHP, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_DHP_less_michaelAlloc; + typedef cc::LazyKVList< cds::gc::nogc, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_NOGC_less_michaelAlloc; + typedef cc::LazyKVList< rcu_gpi, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_RCU_GPI_less_michaelAlloc; + typedef cc::LazyKVList< rcu_gpb, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_RCU_GPB_less_michaelAlloc; + typedef cc::LazyKVList< rcu_gpt, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_RCU_GPT_less_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyKVList< rcu_shb, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_RCU_SHB_less_michaelAlloc; + typedef cc::LazyKVList< rcu_sht, Key, Value, traits_LazyList_less_michaelAlloc > LazyList_RCU_SHT_less_michaelAlloc; +#endif - typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_GPI_cmp_stdAlloc_seqcst; + // *************************************************************************** + // MichaelHashMap based on LazyKVList + typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_HP_cmp_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_cmp_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_cmp_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_cmp_stdAlloc; + typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_cmp_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_cmp_stdAlloc; +#endif - typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_RCU_GPI_cmp_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_HP_less_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_less_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_less_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_less_stdAlloc; + typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_less_stdAlloc, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_less_stdAlloc; +#endif - typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_GPI_less_stdAlloc; + typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_HP_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_cmp_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_cmp_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_cmp_stdAlloc_seqcst; +#endif - typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_GPI_less_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_gpi, MichaelList_RCU_GPI_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_RCU_GPI_less_michaelAlloc; - - // - typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_cmp_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_GPB_cmp_stdAlloc; - - typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_GPB_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_RCU_GPB_cmp_michaelAlloc; - - typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_GPB_less_stdAlloc; - - typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_GPB_less_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_gpb, MichaelList_RCU_GPB_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_RCU_GPB_less_michaelAlloc; - - // - typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_cmp_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_GPT_cmp_stdAlloc; - - typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_GPT_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_RCU_GPT_cmp_michaelAlloc; - - typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_GPT_less_stdAlloc; - - typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_GPT_less_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_gpt, MichaelList_RCU_GPT_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_RCU_GPT_less_michaelAlloc; - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_cmp_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_SHB_cmp_stdAlloc; - - typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_SHB_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_RCU_SHB_cmp_michaelAlloc; - - typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_SHB_less_stdAlloc; - - typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_SHB_less_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_shb, MichaelList_RCU_SHB_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_RCU_SHB_less_michaelAlloc; - - // - typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_cmp_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_SHT_cmp_stdAlloc; - - typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_SHT_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_RCU_SHT_cmp_michaelAlloc; - - typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_SHT_less_stdAlloc; - - typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_RCU_SHT_less_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_sht, MichaelList_RCU_SHT_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_RCU_SHT_less_michaelAlloc; -#endif - - // gc::nogc - typedef NogcMapWrapper< cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_cmp_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > > MichaelMap_NOGC_cmp_stdAlloc; - - typedef NogcMapWrapper< cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > > MichaelMap_NOGC_cmp_stdAlloc_seqcst; - - typedef NogcMapWrapper< cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > > MichaelMap_NOGC_cmp_michaelAlloc; - - typedef NogcMapWrapper< cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > > MichaelMap_NOGC_less_stdAlloc; - - typedef NogcMapWrapper< cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > > MichaelMap_NOGC_less_stdAlloc_seqcst; - - typedef NogcMapWrapper< cc::MichaelHashMap< cds::gc::nogc, MichaelList_NOGC_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > > MichaelMap_NOGC_less_michaelAlloc; - - - // *************************************************************************** - // LazyKVList - - typedef cc::LazyKVList< cds::gc::HP, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > LazyList_HP_cmp_stdAlloc; - - typedef cc::LazyKVList< cds::gc::HP, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_HP_cmp_stdAlloc_seqcst; - - typedef cc::LazyKVList< cds::gc::HP, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_HP_cmp_michaelAlloc; - - typedef cc::LazyKVList< cds::gc::HP, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - >::type - > LazyList_HP_less_stdAlloc; - - typedef cc::LazyKVList< cds::gc::HP, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_HP_less_stdAlloc_seqcst; - - typedef cc::LazyKVList< cds::gc::HP, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_HP_less_michaelAlloc; - - typedef cc::LazyKVList< cds::gc::DHP, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > LazyList_DHP_cmp_stdAlloc; - - typedef cc::LazyKVList< cds::gc::DHP, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_DHP_cmp_stdAlloc_seqcst; - - typedef cc::LazyKVList< cds::gc::DHP, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_DHP_cmp_michaelAlloc; - - typedef cc::LazyKVList< cds::gc::DHP, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - >::type - > LazyList_DHP_less_stdAlloc; - - typedef cc::LazyKVList< cds::gc::DHP, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_DHP_less_stdAlloc_seqcst; - - typedef cc::LazyKVList< cds::gc::DHP, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_DHP_less_michaelAlloc; - - // RCU - typedef cc::LazyKVList< rcu_gpi, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > LazyList_RCU_GPI_cmp_stdAlloc; - - typedef cc::LazyKVList< rcu_gpi, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_GPI_cmp_stdAlloc_seqcst; - - typedef cc::LazyKVList< rcu_gpi, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_RCU_GPI_cmp_michaelAlloc; - - typedef cc::LazyKVList< rcu_gpi, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - >::type - > LazyList_RCU_GPI_less_stdAlloc; - - typedef cc::LazyKVList< rcu_gpi, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_GPI_less_stdAlloc_seqcst; - - typedef cc::LazyKVList< rcu_gpi, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_RCU_GPI_less_michaelAlloc; - - // - typedef cc::LazyKVList< rcu_gpb, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > LazyList_RCU_GPB_cmp_stdAlloc; - - typedef cc::LazyKVList< rcu_gpb, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_GPB_cmp_stdAlloc_seqcst; - - typedef cc::LazyKVList< rcu_gpb, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_RCU_GPB_cmp_michaelAlloc; - - typedef cc::LazyKVList< rcu_gpb, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - >::type - > LazyList_RCU_GPB_less_stdAlloc; - - typedef cc::LazyKVList< rcu_gpb, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_GPB_less_stdAlloc_seqcst; - - typedef cc::LazyKVList< rcu_gpb, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_RCU_GPB_less_michaelAlloc; - - // - typedef cc::LazyKVList< rcu_gpt, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > LazyList_RCU_GPT_cmp_stdAlloc; - - typedef cc::LazyKVList< rcu_gpt, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_GPT_cmp_stdAlloc_seqcst; - - typedef cc::LazyKVList< rcu_gpt, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_RCU_GPT_cmp_michaelAlloc; - - typedef cc::LazyKVList< rcu_gpt, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - >::type - > LazyList_RCU_GPT_less_stdAlloc; - - typedef cc::LazyKVList< rcu_gpt, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_GPT_less_stdAlloc_seqcst; - - typedef cc::LazyKVList< rcu_gpt, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_RCU_GPT_less_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_HP_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_DHP_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_NOGC_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPI_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPB_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_GPT_less_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHB_less_stdAlloc_seqcst; + typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_less_stdAlloc_seqcst, traits_MichaelMap_hash > MichaelMap_Lazy_RCU_SHT_less_stdAlloc_seqcst; +#endif + typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_HP_cmp_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_DHP_cmp_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_NOGC_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPI_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPB_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPT_cmp_michaelAlloc; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::LazyKVList< rcu_shb, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > LazyList_RCU_SHB_cmp_stdAlloc; - - typedef cc::LazyKVList< rcu_shb, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_SHB_cmp_stdAlloc_seqcst; - - typedef cc::LazyKVList< rcu_shb, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_RCU_SHB_cmp_michaelAlloc; - - typedef cc::LazyKVList< rcu_shb, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - >::type - > LazyList_RCU_SHB_less_stdAlloc; - - typedef cc::LazyKVList< rcu_shb, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_SHB_less_stdAlloc_seqcst; - - typedef cc::LazyKVList< rcu_shb, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_RCU_SHB_less_michaelAlloc; - - // - typedef cc::LazyKVList< rcu_sht, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > LazyList_RCU_SHT_cmp_stdAlloc; - - typedef cc::LazyKVList< rcu_sht, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_SHT_cmp_stdAlloc_seqcst; - - typedef cc::LazyKVList< rcu_sht, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_RCU_SHT_cmp_michaelAlloc; - - typedef cc::LazyKVList< rcu_sht, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - >::type - > LazyList_RCU_SHT_less_stdAlloc; - - typedef cc::LazyKVList< rcu_sht, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_SHT_less_stdAlloc_seqcst; - - typedef cc::LazyKVList< rcu_sht, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_RCU_SHT_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_SHB_cmp_michaelAlloc; + typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_SHT_cmp_michaelAlloc; #endif - - // gc::nogc - typedef cc::LazyKVList< cds::gc::nogc, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > LazyList_NOGC_cmp_stdAlloc; - - typedef cc::LazyKVList< cds::gc::nogc, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_NOGC_cmp_stdAlloc_seqcst; - - typedef cc::LazyKVList< cds::gc::nogc, Key, Value, - typename cc::lazy_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_NOGC_cmp_michaelAlloc; - - typedef cc::LazyKVList< cds::gc::nogc, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - >::type - > LazyList_NOGC_less_stdAlloc; - - typedef cc::LazyKVList< cds::gc::nogc, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_NOGC_less_stdAlloc_seqcst; - - typedef cc::LazyKVList< cds::gc::nogc, Key, Value, - typename cc::lazy_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_NOGC_less_michaelAlloc; - - - // *************************************************************************** - // MichaelHashMap based on LazyKVList - - typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_cmp_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_HP_cmp_stdAlloc; - - typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_HP_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_Lazy_HP_cmp_michaelAlloc; - - typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_HP_less_stdAlloc; - - typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_HP_less_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_Lazy_HP_less_michaelAlloc; - - typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_cmp_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_DHP_cmp_stdAlloc; - - typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_DHP_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_Lazy_DHP_cmp_michaelAlloc; - - typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_DHP_less_stdAlloc; - - typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_DHP_less_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_Lazy_DHP_less_michaelAlloc; - - // RCU - typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_cmp_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_GPI_cmp_stdAlloc; - - typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_GPI_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_Lazy_RCU_GPI_cmp_michaelAlloc; - - typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_GPI_less_stdAlloc; - - typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_GPI_less_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_Lazy_RCU_GPI_less_michaelAlloc; - - // - typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_cmp_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_GPB_cmp_stdAlloc; - - typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_GPB_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_Lazy_RCU_GPB_cmp_michaelAlloc; - - typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_GPB_less_stdAlloc; - - typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_GPB_less_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_Lazy_RCU_GPB_less_michaelAlloc; - - // - typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_cmp_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_GPT_cmp_stdAlloc; - - typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_GPT_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_Lazy_RCU_GPT_cmp_michaelAlloc; - - typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_GPT_less_stdAlloc; - - typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_GPT_less_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_Lazy_RCU_GPT_less_michaelAlloc; - - + typedef cc::MichaelHashMap< cds::gc::HP, LazyList_HP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_HP_less_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::DHP, LazyList_DHP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_DHP_less_michaelAlloc; + typedef cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_NOGC_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpi, LazyList_RCU_GPI_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPI_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpb, LazyList_RCU_GPB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPB_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_gpt, LazyList_RCU_GPT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_GPT_less_michaelAlloc; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_cmp_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_SHB_cmp_stdAlloc; - - typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_SHB_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_Lazy_RCU_SHB_cmp_michaelAlloc; - - typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_SHB_less_stdAlloc; - - typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_SHB_less_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_Lazy_RCU_SHB_less_michaelAlloc; - - // - typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_cmp_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_SHT_cmp_stdAlloc; - - typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_SHT_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_Lazy_RCU_SHT_cmp_michaelAlloc; - - typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_SHT_less_stdAlloc; - - typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > MichaelMap_Lazy_RCU_SHT_less_stdAlloc_seqcst; - - typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelMap_Lazy_RCU_SHT_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_shb, LazyList_RCU_SHB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_SHB_less_michaelAlloc; + typedef cc::MichaelHashMap< rcu_sht, LazyList_RCU_SHT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelMap_Lazy_RCU_SHT_less_michaelAlloc; #endif - // gc::nogc - typedef NogcMapWrapper< cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_cmp_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > > MichaelMap_Lazy_NOGC_cmp_stdAlloc; - - typedef NogcMapWrapper< cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_cmp_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > > MichaelMap_Lazy_NOGC_cmp_stdAlloc_seqcst; - - typedef NogcMapWrapper< cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_cmp_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > > MichaelMap_Lazy_NOGC_cmp_michaelAlloc; - - typedef NogcMapWrapper< cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_less_stdAlloc, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > > MichaelMap_Lazy_NOGC_less_stdAlloc; - - typedef NogcMapWrapper< cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_less_stdAlloc_seqcst, - typename cc::michael_map::make_traits< - co::hash< hash > - >::type - > > MichaelMap_Lazy_NOGC_less_stdAlloc_seqcst; - - typedef NogcMapWrapper< cc::MichaelHashMap< cds::gc::nogc, LazyList_NOGC_less_michaelAlloc, - typename cc::michael_map::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > > MichaelMap_Lazy_NOGC_less_michaelAlloc; - - // *************************************************************************** // SplitListMap based on MichaelList diff --git a/tests/unit/set2/set_types.h b/tests/unit/set2/set_types.h index 88304a24..c8ae5d17 100644 --- a/tests/unit/set2/set_types.h +++ b/tests/unit/set2/set_types.h @@ -309,1131 +309,309 @@ namespace set2 { // *************************************************************************** // MichaelList - typedef cc::MichaelList< cds::gc::HP, key_val, - typename cc::michael_list::make_traits< + struct traits_MichaelList_cmp_stdAlloc: + public cc::michael_list::make_traits< co::compare< compare > >::type - > MichaelList_HP_cmp_stdAlloc; - - typedef cc::MichaelList< cds::gc::HP, key_val, - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_HP_cmp_stdAlloc_seqcst; - - typedef cc::MichaelList< cds::gc::HP, key_val, - typename cc::michael_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_HP_cmp_michaelAlloc; - - typedef cc::MichaelList< cds::gc::HP, key_val, - typename cc::michael_list::make_traits< - co::less< less > - >::type - > MichaelList_HP_less_stdAlloc; - - typedef cc::MichaelList< cds::gc::HP, key_val, - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_HP_less_stdAlloc_seqcst; - - typedef cc::MichaelList< cds::gc::HP, key_val, - typename cc::michael_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_HP_less_michaelAlloc; - - typedef cc::MichaelList< cds::gc::DHP, key_val, - typename cc::michael_list::make_traits< - co::compare< compare > - >::type - > MichaelList_DHP_cmp_stdAlloc; - - typedef cc::MichaelList< cds::gc::DHP, key_val, - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_DHP_cmp_stdAlloc_seqcst; - - typedef cc::MichaelList< cds::gc::DHP, key_val, - typename cc::michael_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_DHP_cmp_michaelAlloc; - - typedef cc::MichaelList< cds::gc::DHP, key_val, - typename cc::michael_list::make_traits< - co::less< less > - >::type - > MichaelList_DHP_less_stdAlloc; - - typedef cc::MichaelList< cds::gc::DHP, key_val, - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_DHP_less_stdAlloc_seqcst; - - typedef cc::MichaelList< cds::gc::DHP, key_val, - typename cc::michael_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_DHP_less_michaelAlloc; - - - typedef cc::MichaelList< rcu_gpi, key_val, - typename cc::michael_list::make_traits< - co::compare< compare > - >::type - > MichaelList_RCU_GPI_cmp_stdAlloc; - - typedef cc::MichaelList< rcu_gpi, key_val, - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_GPI_cmp_stdAlloc_seqcst; - - typedef cc::MichaelList< rcu_gpi, key_val, - typename cc::michael_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_GPI_cmp_michaelAlloc; - - typedef cc::MichaelList< rcu_gpi, key_val, - typename cc::michael_list::make_traits< - co::less< less > - >::type - > MichaelList_RCU_GPI_less_stdAlloc; - - typedef cc::MichaelList< rcu_gpi, key_val, - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_GPI_less_stdAlloc_seqcst; - - typedef cc::MichaelList< rcu_gpi, key_val, - typename cc::michael_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_GPI_less_michaelAlloc; - - - typedef cc::MichaelList< rcu_gpb, key_val, - typename cc::michael_list::make_traits< - co::compare< compare > - >::type - > MichaelList_RCU_GPB_cmp_stdAlloc; - - typedef cc::MichaelList< rcu_gpb, key_val, - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_GPB_cmp_stdAlloc_seqcst; - - typedef cc::MichaelList< rcu_gpb, key_val, - typename cc::michael_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_GPB_cmp_michaelAlloc; - - typedef cc::MichaelList< rcu_gpb, key_val, - typename cc::michael_list::make_traits< - co::less< less > - >::type - > MichaelList_RCU_GPB_less_stdAlloc; - - typedef cc::MichaelList< rcu_gpb, key_val, - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_GPB_less_stdAlloc_seqcst; - - typedef cc::MichaelList< rcu_gpb, key_val, - typename cc::michael_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_GPB_less_michaelAlloc; - - - typedef cc::MichaelList< rcu_gpt, key_val, - typename cc::michael_list::make_traits< - co::compare< compare > - >::type - > MichaelList_RCU_GPT_cmp_stdAlloc; - - typedef cc::MichaelList< rcu_gpt, key_val, - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_GPT_cmp_stdAlloc_seqcst; - - typedef cc::MichaelList< rcu_gpt, key_val, - typename cc::michael_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_GPT_cmp_michaelAlloc; - - typedef cc::MichaelList< rcu_gpt, key_val, - typename cc::michael_list::make_traits< - co::less< less > - >::type - > MichaelList_RCU_GPT_less_stdAlloc; - - typedef cc::MichaelList< rcu_gpt, key_val, - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_GPT_less_stdAlloc_seqcst; - - typedef cc::MichaelList< rcu_gpt, key_val, - typename cc::michael_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_GPT_less_michaelAlloc; - -#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelList< rcu_shb, key_val, - typename cc::michael_list::make_traits< - co::compare< compare > - >::type - > MichaelList_RCU_SHB_cmp_stdAlloc; - - typedef cc::MichaelList< rcu_shb, key_val, - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_SHB_cmp_stdAlloc_seqcst; - - typedef cc::MichaelList< rcu_shb, key_val, - typename cc::michael_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_SHB_cmp_michaelAlloc; - - typedef cc::MichaelList< rcu_shb, key_val, - typename cc::michael_list::make_traits< - co::less< less > - >::type - > MichaelList_RCU_SHB_less_stdAlloc; - - typedef cc::MichaelList< rcu_shb, key_val, - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_SHB_less_stdAlloc_seqcst; - - typedef cc::MichaelList< rcu_shb, key_val, - typename cc::michael_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_SHB_less_michaelAlloc; - - - typedef cc::MichaelList< rcu_sht, key_val, - typename cc::michael_list::make_traits< - co::compare< compare > - >::type - > MichaelList_RCU_SHT_cmp_stdAlloc; - - typedef cc::MichaelList< rcu_sht, key_val, - typename cc::michael_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_SHT_cmp_stdAlloc_seqcst; - - typedef cc::MichaelList< rcu_sht, key_val, - typename cc::michael_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_SHT_cmp_michaelAlloc; - - typedef cc::MichaelList< rcu_sht, key_val, - typename cc::michael_list::make_traits< - co::less< less > - >::type - > MichaelList_RCU_SHT_less_stdAlloc; - - typedef cc::MichaelList< rcu_sht, key_val, - typename cc::michael_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > MichaelList_RCU_SHT_less_stdAlloc_seqcst; - - typedef cc::MichaelList< rcu_sht, key_val, - typename cc::michael_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelList_RCU_SHT_less_michaelAlloc; -#endif - - // *************************************************************************** - // MichaelHashSet based on MichaelList - - typedef cc::MichaelHashSet< cds::gc::HP, MichaelList_HP_cmp_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_HP_cmp_stdAlloc; - - typedef cc::MichaelHashSet< cds::gc::HP, MichaelList_HP_cmp_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_HP_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< cds::gc::HP, MichaelList_HP_cmp_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_HP_cmp_michaelAlloc; - - typedef cc::MichaelHashSet< cds::gc::HP, MichaelList_HP_less_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_HP_less_stdAlloc; - - typedef cc::MichaelHashSet< cds::gc::HP, MichaelList_HP_less_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_HP_less_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< cds::gc::HP, MichaelList_HP_less_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_HP_less_michaelAlloc; - - typedef cc::MichaelHashSet< cds::gc::DHP, MichaelList_DHP_cmp_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_DHP_cmp_stdAlloc; - - typedef cc::MichaelHashSet< cds::gc::DHP, MichaelList_DHP_cmp_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_DHP_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< cds::gc::DHP, MichaelList_DHP_cmp_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_DHP_cmp_michaelAlloc; - - typedef cc::MichaelHashSet< cds::gc::DHP, MichaelList_DHP_less_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_DHP_less_stdAlloc; - - typedef cc::MichaelHashSet< cds::gc::DHP, MichaelList_DHP_less_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_DHP_less_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< cds::gc::DHP, MichaelList_DHP_less_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_DHP_less_michaelAlloc; - - // general_instant RCU - typedef cc::MichaelHashSet< rcu_gpi, MichaelList_RCU_GPI_cmp_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_GPI_cmp_stdAlloc; - - typedef cc::MichaelHashSet< rcu_gpi, MichaelList_RCU_GPI_cmp_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_GPI_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_gpi, MichaelList_RCU_GPI_cmp_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_RCU_GPI_cmp_michaelAlloc; - - typedef cc::MichaelHashSet< rcu_gpi, MichaelList_RCU_GPI_less_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_GPI_less_stdAlloc; - - typedef cc::MichaelHashSet< rcu_gpi, MichaelList_RCU_GPI_less_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_GPI_less_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_gpi, MichaelList_RCU_GPI_less_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_RCU_GPI_less_michaelAlloc; - - // general_buffered RCU - typedef cc::MichaelHashSet< rcu_gpb, MichaelList_RCU_GPB_cmp_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_GPB_cmp_stdAlloc; - - typedef cc::MichaelHashSet< rcu_gpb, MichaelList_RCU_GPB_cmp_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_GPB_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_gpb, MichaelList_RCU_GPB_cmp_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_RCU_GPB_cmp_michaelAlloc; - - typedef cc::MichaelHashSet< rcu_gpb, MichaelList_RCU_GPB_less_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_GPB_less_stdAlloc; - - typedef cc::MichaelHashSet< rcu_gpb, MichaelList_RCU_GPB_less_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_GPB_less_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_gpb, MichaelList_RCU_GPB_less_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_RCU_GPB_less_michaelAlloc; - - // general_threaded RCU - typedef cc::MichaelHashSet< rcu_gpt, MichaelList_RCU_GPT_cmp_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_GPT_cmp_stdAlloc; - - typedef cc::MichaelHashSet< rcu_gpt, MichaelList_RCU_GPT_cmp_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_GPT_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_gpt, MichaelList_RCU_GPT_cmp_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_RCU_GPT_cmp_michaelAlloc; - - typedef cc::MichaelHashSet< rcu_gpt, MichaelList_RCU_GPT_less_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_GPT_less_stdAlloc; - - typedef cc::MichaelHashSet< rcu_gpt, MichaelList_RCU_GPT_less_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_GPT_less_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_gpt, MichaelList_RCU_GPT_less_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_RCU_GPT_less_michaelAlloc; - + {}; + typedef cc::MichaelList< cds::gc::HP, key_val, traits_MichaelList_cmp_stdAlloc > MichaelList_HP_cmp_stdAlloc; + typedef cc::MichaelList< cds::gc::DHP, key_val, traits_MichaelList_cmp_stdAlloc > MichaelList_DHP_cmp_stdAlloc; + typedef cc::MichaelList< rcu_gpi, key_val, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_GPI_cmp_stdAlloc; + typedef cc::MichaelList< rcu_gpb, key_val, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_GPB_cmp_stdAlloc; + typedef cc::MichaelList< rcu_gpt, key_val, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_GPT_cmp_stdAlloc; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - // signal_buffered RCU - typedef cc::MichaelHashSet< rcu_shb, MichaelList_RCU_SHB_cmp_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_SHB_cmp_stdAlloc; - - typedef cc::MichaelHashSet< rcu_shb, MichaelList_RCU_SHB_cmp_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_SHB_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_shb, MichaelList_RCU_SHB_cmp_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_RCU_SHB_cmp_michaelAlloc; - - typedef cc::MichaelHashSet< rcu_shb, MichaelList_RCU_SHB_less_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_SHB_less_stdAlloc; - - typedef cc::MichaelHashSet< rcu_shb, MichaelList_RCU_SHB_less_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_SHB_less_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_shb, MichaelList_RCU_SHB_less_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_RCU_SHB_less_michaelAlloc; - - // signal_threaded RCU - typedef cc::MichaelHashSet< rcu_sht, MichaelList_RCU_SHT_cmp_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_SHT_cmp_stdAlloc; - - typedef cc::MichaelHashSet< rcu_sht, MichaelList_RCU_SHT_cmp_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_SHT_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_sht, MichaelList_RCU_SHT_cmp_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_RCU_SHT_cmp_michaelAlloc; - - typedef cc::MichaelHashSet< rcu_sht, MichaelList_RCU_SHT_less_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_SHT_less_stdAlloc; - - typedef cc::MichaelHashSet< rcu_sht, MichaelList_RCU_SHT_less_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_RCU_SHT_less_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_sht, MichaelList_RCU_SHT_less_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_RCU_SHT_less_michaelAlloc; - + typedef cc::MichaelList< rcu_shb, key_val, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_SHB_cmp_stdAlloc; + typedef cc::MichaelList< rcu_sht, key_val, traits_MichaelList_cmp_stdAlloc > MichaelList_RCU_SHT_cmp_stdAlloc; #endif - // *************************************************************************** - // LazyList - - typedef cc::LazyList< cds::gc::HP, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > LazyList_HP_cmp_stdAlloc; - - typedef cc::LazyList< cds::gc::HP, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_HP_cmp_stdAlloc_seqcst; - - typedef cc::LazyList< cds::gc::HP, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_HP_cmp_michaelAlloc; - - typedef cc::LazyList< cds::gc::HP, key_val, - typename cc::lazy_list::make_traits< - co::less< less > - >::type - > LazyList_HP_less_stdAlloc; - - typedef cc::LazyList< cds::gc::HP, key_val, - typename cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_HP_less_stdAlloc_seqcst; - - typedef cc::LazyList< cds::gc::HP, key_val, - typename cc::lazy_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_HP_less_michaelAlloc; - - typedef cc::LazyList< cds::gc::DHP, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > LazyList_DHP_cmp_stdAlloc; - - typedef cc::LazyList< cds::gc::DHP, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_DHP_cmp_stdAlloc_seqcst; - - typedef cc::LazyList< cds::gc::DHP, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_DHP_cmp_michaelAlloc; - - typedef cc::LazyList< cds::gc::DHP, key_val, - typename cc::lazy_list::make_traits< - co::less< less > - >::type - > LazyList_DHP_less_stdAlloc; - - typedef cc::LazyList< cds::gc::DHP, key_val, - typename cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_DHP_less_stdAlloc_seqcst; - - typedef cc::LazyList< cds::gc::DHP, key_val, - typename cc::lazy_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_DHP_less_michaelAlloc; - - // RCU - typedef cc::LazyList< rcu_gpi, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > LazyList_RCU_GPI_cmp_stdAlloc; - - typedef cc::LazyList< rcu_gpi, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_GPI_cmp_stdAlloc_seqcst; - - typedef cc::LazyList< rcu_gpi, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_RCU_GPI_cmp_michaelAlloc; + struct traits_MichaelList_cmp_stdAlloc_seqcst : public traits_MichaelList_cmp_stdAlloc + { + typedef co::v::sequential_consistent > memory_model; + }; + typedef cc::MichaelList< cds::gc::HP, key_val, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_HP_cmp_stdAlloc_seqcst; + typedef cc::MichaelList< cds::gc::DHP, key_val, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_DHP_cmp_stdAlloc_seqcst; + typedef cc::MichaelList< rcu_gpi, key_val, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_GPI_cmp_stdAlloc_seqcst; + typedef cc::MichaelList< rcu_gpb, key_val, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_GPB_cmp_stdAlloc_seqcst; + typedef cc::MichaelList< rcu_gpt, key_val, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_GPT_cmp_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelList< rcu_shb, key_val, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_SHB_cmp_stdAlloc_seqcst; + typedef cc::MichaelList< rcu_sht, key_val, traits_MichaelList_cmp_stdAlloc_seqcst > MichaelList_RCU_SHT_cmp_stdAlloc_seqcst; +#endif - typedef cc::LazyList< rcu_gpi, key_val, - typename cc::lazy_list::make_traits< + struct traits_MichaelList_less_stdAlloc : + public cc::michael_list::make_traits< co::less< less > >::type - > LazyList_RCU_GPI_less_stdAlloc; + {}; + typedef cc::MichaelList< cds::gc::HP, key_val, traits_MichaelList_less_stdAlloc > MichaelList_HP_less_stdAlloc; + typedef cc::MichaelList< cds::gc::DHP, key_val, traits_MichaelList_less_stdAlloc > MichaelList_DHP_less_stdAlloc; + typedef cc::MichaelList< rcu_gpi, key_val, traits_MichaelList_less_stdAlloc > MichaelList_RCU_GPI_less_stdAlloc; + typedef cc::MichaelList< rcu_gpb, key_val, traits_MichaelList_less_stdAlloc > MichaelList_RCU_GPB_less_stdAlloc; + typedef cc::MichaelList< rcu_gpt, key_val, traits_MichaelList_less_stdAlloc > MichaelList_RCU_GPT_less_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelList< rcu_shb, key_val, traits_MichaelList_less_stdAlloc > MichaelList_RCU_SHB_less_stdAlloc; + typedef cc::MichaelList< rcu_sht, key_val, traits_MichaelList_less_stdAlloc > MichaelList_RCU_SHT_less_stdAlloc; +#endif - typedef cc::LazyList< rcu_gpi, key_val, - typename cc::lazy_list::make_traits< + struct traits_MichaelList_less_stdAlloc_seqcst : + public cc::michael_list::make_traits< co::less< less > ,co::memory_model< co::v::sequential_consistent > >::type - > LazyList_RCU_GPI_less_stdAlloc_seqcst; - - typedef cc::LazyList< rcu_gpi, key_val, - typename cc::lazy_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_RCU_GPI_less_michaelAlloc; - - typedef cc::LazyList< rcu_gpb, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > LazyList_RCU_GPB_cmp_stdAlloc; - - typedef cc::LazyList< rcu_gpb, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_GPB_cmp_stdAlloc_seqcst; + {}; + typedef cc::MichaelList< cds::gc::HP, key_val, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_HP_less_stdAlloc_seqcst; + typedef cc::MichaelList< cds::gc::DHP, key_val, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_DHP_less_stdAlloc_seqcst; + typedef cc::MichaelList< rcu_gpi, key_val, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_GPI_less_stdAlloc_seqcst; + typedef cc::MichaelList< rcu_gpb, key_val, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_GPB_less_stdAlloc_seqcst; + typedef cc::MichaelList< rcu_gpt, key_val, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_GPT_less_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelList< rcu_shb, key_val, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_SHB_less_stdAlloc_seqcst; + typedef cc::MichaelList< rcu_sht, key_val, traits_MichaelList_less_stdAlloc_seqcst > MichaelList_RCU_SHT_less_stdAlloc_seqcst; +#endif - typedef cc::LazyList< rcu_gpb, key_val, - typename cc::lazy_list::make_traits< + struct traits_MichaelList_cmp_michaelAlloc : + public cc::michael_list::make_traits< co::compare< compare >, co::allocator< memory::MichaelAllocator > >::type - > LazyList_RCU_GPB_cmp_michaelAlloc; - - typedef cc::LazyList< rcu_gpb, key_val, - typename cc::lazy_list::make_traits< - co::less< less > - >::type - > LazyList_RCU_GPB_less_stdAlloc; - - typedef cc::LazyList< rcu_gpb, key_val, - typename cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_GPB_less_stdAlloc_seqcst; + {}; + typedef cc::MichaelList< cds::gc::HP, key_val, traits_MichaelList_cmp_michaelAlloc > MichaelList_HP_cmp_michaelAlloc; + typedef cc::MichaelList< cds::gc::DHP, key_val, traits_MichaelList_cmp_michaelAlloc > MichaelList_DHP_cmp_michaelAlloc; + typedef cc::MichaelList< rcu_gpi, key_val, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_GPI_cmp_michaelAlloc; + typedef cc::MichaelList< rcu_gpb, key_val, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_GPB_cmp_michaelAlloc; + typedef cc::MichaelList< rcu_gpt, key_val, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_GPT_cmp_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelList< rcu_shb, key_val, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_SHB_cmp_michaelAlloc; + typedef cc::MichaelList< rcu_sht, key_val, traits_MichaelList_cmp_michaelAlloc > MichaelList_RCU_SHT_cmp_michaelAlloc; +#endif - typedef cc::LazyList< rcu_gpb, key_val, - typename cc::lazy_list::make_traits< + struct traits_MichaelList_less_michaelAlloc : + public cc::michael_list::make_traits< co::less< less >, co::allocator< memory::MichaelAllocator > >::type - > LazyList_RCU_GPB_less_michaelAlloc; - - // - typedef cc::LazyList< rcu_gpt, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > LazyList_RCU_GPT_cmp_stdAlloc; - - typedef cc::LazyList< rcu_gpt, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_GPT_cmp_stdAlloc_seqcst; - - typedef cc::LazyList< rcu_gpt, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_RCU_GPT_cmp_michaelAlloc; - - typedef cc::LazyList< rcu_gpt, key_val, - typename cc::lazy_list::make_traits< - co::less< less > - >::type - > LazyList_RCU_GPT_less_stdAlloc; + {}; + typedef cc::MichaelList< cds::gc::HP, key_val, traits_MichaelList_less_michaelAlloc > MichaelList_HP_less_michaelAlloc; + typedef cc::MichaelList< cds::gc::DHP, key_val, traits_MichaelList_less_michaelAlloc > MichaelList_DHP_less_michaelAlloc; + typedef cc::MichaelList< rcu_gpi, key_val, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_GPI_less_michaelAlloc; + typedef cc::MichaelList< rcu_gpb, key_val, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_GPB_less_michaelAlloc; + typedef cc::MichaelList< rcu_gpt, key_val, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_GPT_less_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelList< rcu_shb, key_val, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_SHB_less_michaelAlloc; + typedef cc::MichaelList< rcu_sht, key_val, traits_MichaelList_less_michaelAlloc > MichaelList_RCU_SHT_less_michaelAlloc; +#endif - typedef cc::LazyList< rcu_gpt, key_val, - typename cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_GPT_less_stdAlloc_seqcst; + // *************************************************************************** + // MichaelHashSet based on MichaelList - typedef cc::LazyList< rcu_gpt, key_val, - typename cc::lazy_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > + struct traits_MichaelSet_stdAlloc : + public cc::michael_set::make_traits< + co::hash< hash > >::type - > LazyList_RCU_GPT_less_michaelAlloc; + {}; + typedef cc::MichaelHashSet< cds::gc::HP, MichaelList_HP_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_HP_cmp_stdAlloc; + typedef cc::MichaelHashSet< cds::gc::DHP, MichaelList_DHP_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_DHP_cmp_stdAlloc; + typedef cc::MichaelHashSet< rcu_gpi, MichaelList_RCU_GPI_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPI_cmp_stdAlloc; + typedef cc::MichaelHashSet< rcu_gpb, MichaelList_RCU_GPB_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPB_cmp_stdAlloc; + typedef cc::MichaelHashSet< rcu_gpt, MichaelList_RCU_GPT_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPT_cmp_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashSet< rcu_shb, MichaelList_RCU_SHB_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_SHB_cmp_stdAlloc; + typedef cc::MichaelHashSet< rcu_sht, MichaelList_RCU_SHT_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_SHT_cmp_stdAlloc; +#endif + typedef cc::MichaelHashSet< cds::gc::HP, MichaelList_HP_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_HP_less_stdAlloc; + typedef cc::MichaelHashSet< cds::gc::DHP, MichaelList_DHP_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_DHP_less_stdAlloc; + typedef cc::MichaelHashSet< rcu_gpi, MichaelList_RCU_GPI_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPI_less_stdAlloc; + typedef cc::MichaelHashSet< rcu_gpb, MichaelList_RCU_GPB_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPB_less_stdAlloc; + typedef cc::MichaelHashSet< rcu_gpt, MichaelList_RCU_GPT_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPT_less_stdAlloc; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::LazyList< rcu_shb, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare > - >::type - > LazyList_RCU_SHB_cmp_stdAlloc; + typedef cc::MichaelHashSet< rcu_shb, MichaelList_RCU_SHB_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_SHB_less_stdAlloc; + typedef cc::MichaelHashSet< rcu_sht, MichaelList_RCU_SHT_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_RCU_SHT_less_stdAlloc; +#endif - typedef cc::LazyList< rcu_shb, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_SHB_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashSet< cds::gc::HP, MichaelList_HP_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_HP_less_stdAlloc_seqcst; + typedef cc::MichaelHashSet< cds::gc::DHP, MichaelList_DHP_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_DHP_less_stdAlloc_seqcst; + typedef cc::MichaelHashSet< rcu_gpi, MichaelList_RCU_GPI_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPI_less_stdAlloc_seqcst; + typedef cc::MichaelHashSet< rcu_gpb, MichaelList_RCU_GPB_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPB_less_stdAlloc_seqcst; + typedef cc::MichaelHashSet< rcu_gpt, MichaelList_RCU_GPT_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_RCU_GPT_less_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashSet< rcu_shb, MichaelList_RCU_SHB_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_RCU_SHB_less_stdAlloc_seqcst; + typedef cc::MichaelHashSet< rcu_sht, MichaelList_RCU_SHT_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_RCU_SHT_less_stdAlloc_seqcst; +#endif - typedef cc::LazyList< rcu_shb, key_val, - typename cc::lazy_list::make_traits< - co::compare< compare >, + struct traits_MichaelSet_michaelAlloc : + public cc::michael_set::make_traits< + co::hash< hash >, co::allocator< memory::MichaelAllocator > >::type - > LazyList_RCU_SHB_cmp_michaelAlloc; + {}; + typedef cc::MichaelHashSet< cds::gc::HP, MichaelList_HP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_HP_cmp_michaelAlloc; + typedef cc::MichaelHashSet< cds::gc::DHP, MichaelList_DHP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_DHP_cmp_michaelAlloc; + typedef cc::MichaelHashSet< rcu_gpi, MichaelList_RCU_GPI_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_GPI_cmp_michaelAlloc; + typedef cc::MichaelHashSet< rcu_gpb, MichaelList_RCU_GPB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_GPB_cmp_michaelAlloc; + typedef cc::MichaelHashSet< rcu_gpt, MichaelList_RCU_GPT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_GPT_cmp_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashSet< rcu_shb, MichaelList_RCU_SHB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_SHB_cmp_michaelAlloc; + typedef cc::MichaelHashSet< rcu_sht, MichaelList_RCU_SHT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_SHT_cmp_michaelAlloc; +#endif - typedef cc::LazyList< rcu_shb, key_val, - typename cc::lazy_list::make_traits< - co::less< less > - >::type - > LazyList_RCU_SHB_less_stdAlloc; + typedef cc::MichaelHashSet< cds::gc::HP, MichaelList_HP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_HP_less_michaelAlloc; + typedef cc::MichaelHashSet< cds::gc::DHP, MichaelList_DHP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_DHP_less_michaelAlloc; + typedef cc::MichaelHashSet< rcu_gpi, MichaelList_RCU_GPI_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_GPI_less_michaelAlloc; + typedef cc::MichaelHashSet< rcu_gpb, MichaelList_RCU_GPB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_GPB_less_michaelAlloc; + typedef cc::MichaelHashSet< rcu_gpt, MichaelList_RCU_GPT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_GPT_less_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashSet< rcu_shb, MichaelList_RCU_SHB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_SHB_less_michaelAlloc; + typedef cc::MichaelHashSet< rcu_sht, MichaelList_RCU_SHT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_RCU_SHT_less_michaelAlloc; +#endif - typedef cc::LazyList< rcu_shb, key_val, - typename cc::lazy_list::make_traits< - co::less< less > - ,co::memory_model< co::v::sequential_consistent > - >::type - > LazyList_RCU_SHB_less_stdAlloc_seqcst; - typedef cc::LazyList< rcu_shb, key_val, - typename cc::lazy_list::make_traits< - co::less< less >, - co::allocator< memory::MichaelAllocator > - >::type - > LazyList_RCU_SHB_less_michaelAlloc; + // *************************************************************************** + // LazyList - // - typedef cc::LazyList< rcu_sht, key_val, - typename cc::lazy_list::make_traits< + struct traits_LazyList_cmp_stdAlloc : + public cc::lazy_list::make_traits< co::compare< compare > >::type - > LazyList_RCU_SHT_cmp_stdAlloc; - - typedef cc::LazyList< rcu_sht, key_val, - typename cc::lazy_list::make_traits< + {}; + typedef cc::LazyList< cds::gc::HP, key_val, traits_LazyList_cmp_stdAlloc > LazyList_HP_cmp_stdAlloc; + typedef cc::LazyList< cds::gc::DHP, key_val, traits_LazyList_cmp_stdAlloc > LazyList_DHP_cmp_stdAlloc; + typedef cc::LazyList< rcu_gpi, key_val, traits_LazyList_cmp_stdAlloc > LazyList_RCU_GPI_cmp_stdAlloc; + typedef cc::LazyList< rcu_gpb, key_val, traits_LazyList_cmp_stdAlloc > LazyList_RCU_GPB_cmp_stdAlloc; + typedef cc::LazyList< rcu_gpt, key_val, traits_LazyList_cmp_stdAlloc > LazyList_RCU_GPT_cmp_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyList< rcu_shb, key_val, traits_LazyList_cmp_stdAlloc > LazyList_RCU_SHB_cmp_stdAlloc; + typedef cc::LazyList< rcu_sht, key_val, traits_LazyList_cmp_stdAlloc > LazyList_RCU_SHT_cmp_stdAlloc; +#endif + struct traits_LazyList_cmp_stdAlloc_seqcst : + public cc::lazy_list::make_traits< co::compare< compare > ,co::memory_model< co::v::sequential_consistent > >::type - > LazyList_RCU_SHT_cmp_stdAlloc_seqcst; - - typedef cc::LazyList< rcu_sht, key_val, - typename cc::lazy_list::make_traits< + {}; + typedef cc::LazyList< cds::gc::HP, key_val, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_HP_cmp_stdAlloc_seqcst; + typedef cc::LazyList< cds::gc::DHP, key_val, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_DHP_cmp_stdAlloc_seqcst; + typedef cc::LazyList< rcu_gpi, key_val, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_GPI_cmp_stdAlloc_seqcst; + typedef cc::LazyList< rcu_gpb, key_val, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_GPB_cmp_stdAlloc_seqcst; + typedef cc::LazyList< rcu_gpt, key_val, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_GPT_cmp_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyList< rcu_shb, key_val, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_SHB_cmp_stdAlloc_seqcst; + typedef cc::LazyList< rcu_sht, key_val, traits_LazyList_cmp_stdAlloc_seqcst > LazyList_RCU_SHT_cmp_stdAlloc_seqcst; +#endif + struct traits_LazyList_cmp_michaelAlloc : + public cc::lazy_list::make_traits< co::compare< compare >, co::allocator< memory::MichaelAllocator > >::type - > LazyList_RCU_SHT_cmp_michaelAlloc; + {}; + typedef cc::LazyList< cds::gc::HP, key_val, traits_LazyList_cmp_michaelAlloc > LazyList_HP_cmp_michaelAlloc; + typedef cc::LazyList< cds::gc::DHP, key_val, traits_LazyList_cmp_michaelAlloc > LazyList_DHP_cmp_michaelAlloc; + typedef cc::LazyList< rcu_gpi, key_val, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_GPI_cmp_michaelAlloc; + typedef cc::LazyList< rcu_gpb, key_val, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_GPB_cmp_michaelAlloc; + typedef cc::LazyList< rcu_gpt, key_val, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_GPT_cmp_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyList< rcu_shb, key_val, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_SHB_cmp_michaelAlloc; + typedef cc::LazyList< rcu_sht, key_val, traits_LazyList_cmp_michaelAlloc > LazyList_RCU_SHT_cmp_michaelAlloc; +#endif - typedef cc::LazyList< rcu_sht, key_val, - typename cc::lazy_list::make_traits< + struct traits_LazyList_less_stdAlloc: + public cc::lazy_list::make_traits< co::less< less > >::type - > LazyList_RCU_SHT_less_stdAlloc; + {}; + typedef cc::LazyList< cds::gc::HP, key_val, traits_LazyList_less_stdAlloc > LazyList_HP_less_stdAlloc; + typedef cc::LazyList< cds::gc::DHP, key_val, traits_LazyList_less_stdAlloc > LazyList_DHP_less_stdAlloc; + typedef cc::LazyList< rcu_gpi, key_val, traits_LazyList_less_stdAlloc > LazyList_RCU_GPI_less_stdAlloc; + typedef cc::LazyList< rcu_gpb, key_val, traits_LazyList_less_stdAlloc > LazyList_RCU_GPB_less_stdAlloc; + typedef cc::LazyList< rcu_gpt, key_val, traits_LazyList_less_stdAlloc > LazyList_RCU_GPT_less_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyList< rcu_shb, key_val, traits_LazyList_less_stdAlloc > LazyList_RCU_SHB_less_stdAlloc; + typedef cc::LazyList< rcu_sht, key_val, traits_LazyList_less_stdAlloc > LazyList_RCU_SHT_less_stdAlloc; +#endif - typedef cc::LazyList< rcu_sht, key_val, - typename cc::lazy_list::make_traits< + struct traits_LazyList_less_stdAlloc_seqcst : + public cc::lazy_list::make_traits< co::less< less > ,co::memory_model< co::v::sequential_consistent > >::type - > LazyList_RCU_SHT_less_stdAlloc_seqcst; + {}; + typedef cc::LazyList< cds::gc::HP, key_val, traits_LazyList_less_stdAlloc_seqcst > LazyList_HP_less_stdAlloc_seqcst; + typedef cc::LazyList< cds::gc::DHP, key_val, traits_LazyList_less_stdAlloc_seqcst > LazyList_DHP_less_stdAlloc_seqcst; + typedef cc::LazyList< rcu_gpi, key_val, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_GPI_less_stdAlloc_seqcst; + typedef cc::LazyList< rcu_gpb, key_val, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_GPB_less_stdAlloc_seqcst; + typedef cc::LazyList< rcu_gpt, key_val, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_GPT_less_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyList< rcu_shb, key_val, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_SHB_less_stdAlloc_seqcst; + typedef cc::LazyList< rcu_sht, key_val, traits_LazyList_less_stdAlloc_seqcst > LazyList_RCU_SHT_less_stdAlloc_seqcst; +#endif - typedef cc::LazyList< rcu_sht, key_val, - typename cc::lazy_list::make_traits< + struct traits_LazyList_less_michaelAlloc : + public cc::lazy_list::make_traits< co::less< less >, co::allocator< memory::MichaelAllocator > >::type - > LazyList_RCU_SHT_less_michaelAlloc; - + {}; + typedef cc::LazyList< cds::gc::HP, key_val, traits_LazyList_less_michaelAlloc > LazyList_HP_less_michaelAlloc; + typedef cc::LazyList< cds::gc::DHP, key_val, traits_LazyList_less_michaelAlloc > LazyList_DHP_less_michaelAlloc; + typedef cc::LazyList< rcu_gpi, key_val, traits_LazyList_less_michaelAlloc > LazyList_RCU_GPI_less_michaelAlloc; + typedef cc::LazyList< rcu_gpb, key_val, traits_LazyList_less_michaelAlloc > LazyList_RCU_GPB_less_michaelAlloc; + typedef cc::LazyList< rcu_gpt, key_val, traits_LazyList_less_michaelAlloc > LazyList_RCU_GPT_less_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::LazyList< rcu_shb, key_val, traits_LazyList_less_michaelAlloc > LazyList_RCU_SHB_less_michaelAlloc; + typedef cc::LazyList< rcu_sht, key_val, traits_LazyList_less_michaelAlloc > LazyList_RCU_SHT_less_michaelAlloc; #endif // *************************************************************************** // MichaelHashSet based on LazyList - typedef cc::MichaelHashSet< cds::gc::HP, LazyList_HP_cmp_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_HP_cmp_stdAlloc; - - typedef cc::MichaelHashSet< cds::gc::HP, LazyList_HP_cmp_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_HP_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< cds::gc::HP, LazyList_HP_cmp_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_Lazy_HP_cmp_michaelAlloc; - - typedef cc::MichaelHashSet< cds::gc::HP, LazyList_HP_less_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_HP_less_stdAlloc; - - typedef cc::MichaelHashSet< cds::gc::HP, LazyList_HP_less_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_HP_less_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< cds::gc::HP, LazyList_HP_less_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_Lazy_HP_less_michaelAlloc; - - typedef cc::MichaelHashSet< cds::gc::DHP, LazyList_DHP_cmp_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_DHP_cmp_stdAlloc; - - typedef cc::MichaelHashSet< cds::gc::DHP, LazyList_DHP_cmp_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_DHP_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< cds::gc::DHP, LazyList_DHP_cmp_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_Lazy_DHP_cmp_michaelAlloc; - - typedef cc::MichaelHashSet< cds::gc::DHP, LazyList_DHP_less_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_DHP_less_stdAlloc; - - typedef cc::MichaelHashSet< cds::gc::DHP, LazyList_DHP_less_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_DHP_less_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< cds::gc::DHP, LazyList_DHP_less_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_Lazy_DHP_less_michaelAlloc; - - // RCU - typedef cc::MichaelHashSet< rcu_gpi, LazyList_RCU_GPI_cmp_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_GPI_cmp_stdAlloc; - - typedef cc::MichaelHashSet< rcu_gpi, LazyList_RCU_GPI_cmp_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_GPI_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_gpi, LazyList_RCU_GPI_cmp_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_Lazy_RCU_GPI_cmp_michaelAlloc; - - typedef cc::MichaelHashSet< rcu_gpi, LazyList_RCU_GPI_less_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_GPI_less_stdAlloc; - - typedef cc::MichaelHashSet< rcu_gpi, LazyList_RCU_GPI_less_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_GPI_less_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_gpi, LazyList_RCU_GPI_less_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_Lazy_RCU_GPI_less_michaelAlloc; - - - typedef cc::MichaelHashSet< rcu_gpb, LazyList_RCU_GPB_cmp_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_GPB_cmp_stdAlloc; - - typedef cc::MichaelHashSet< rcu_gpb, LazyList_RCU_GPB_cmp_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_GPB_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_gpb, LazyList_RCU_GPB_cmp_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_Lazy_RCU_GPB_cmp_michaelAlloc; - - typedef cc::MichaelHashSet< rcu_gpb, LazyList_RCU_GPB_less_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_GPB_less_stdAlloc; - - typedef cc::MichaelHashSet< rcu_gpb, LazyList_RCU_GPB_less_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_GPB_less_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_gpb, LazyList_RCU_GPB_less_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_Lazy_RCU_GPB_less_michaelAlloc; - - - typedef cc::MichaelHashSet< rcu_gpt, LazyList_RCU_GPT_cmp_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_GPT_cmp_stdAlloc; - - typedef cc::MichaelHashSet< rcu_gpt, LazyList_RCU_GPT_cmp_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_GPT_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_gpt, LazyList_RCU_GPT_cmp_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_Lazy_RCU_GPT_cmp_michaelAlloc; - - typedef cc::MichaelHashSet< rcu_gpt, LazyList_RCU_GPT_less_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_GPT_less_stdAlloc; - - typedef cc::MichaelHashSet< rcu_gpt, LazyList_RCU_GPT_less_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_GPT_less_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_gpt, LazyList_RCU_GPT_less_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_Lazy_RCU_GPT_less_michaelAlloc; - + typedef cc::MichaelHashSet< cds::gc::HP, LazyList_HP_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_HP_cmp_stdAlloc; + typedef cc::MichaelHashSet< cds::gc::DHP, LazyList_DHP_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_DHP_cmp_stdAlloc; + typedef cc::MichaelHashSet< rcu_gpi, LazyList_RCU_GPI_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPI_cmp_stdAlloc; + typedef cc::MichaelHashSet< rcu_gpb, LazyList_RCU_GPB_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPB_cmp_stdAlloc; + typedef cc::MichaelHashSet< rcu_gpt, LazyList_RCU_GPT_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPT_cmp_stdAlloc; #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED - typedef cc::MichaelHashSet< rcu_shb, LazyList_RCU_SHB_cmp_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_SHB_cmp_stdAlloc; - - typedef cc::MichaelHashSet< rcu_shb, LazyList_RCU_SHB_cmp_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_SHB_cmp_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_shb, LazyList_RCU_SHB_cmp_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_Lazy_RCU_SHB_cmp_michaelAlloc; - - typedef cc::MichaelHashSet< rcu_shb, LazyList_RCU_SHB_less_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_SHB_less_stdAlloc; - - typedef cc::MichaelHashSet< rcu_shb, LazyList_RCU_SHB_less_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_SHB_less_stdAlloc_seqcst; - - typedef cc::MichaelHashSet< rcu_shb, LazyList_RCU_SHB_less_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_Lazy_RCU_SHB_less_michaelAlloc; - - - typedef cc::MichaelHashSet< rcu_sht, LazyList_RCU_SHT_cmp_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_SHT_cmp_stdAlloc; - - typedef cc::MichaelHashSet< rcu_sht, LazyList_RCU_SHT_cmp_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_SHT_cmp_stdAlloc_seqcst; + typedef cc::MichaelHashSet< rcu_shb, LazyList_RCU_SHB_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_SHB_cmp_stdAlloc; + typedef cc::MichaelHashSet< rcu_sht, LazyList_RCU_SHT_cmp_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_SHT_cmp_stdAlloc; +#endif - typedef cc::MichaelHashSet< rcu_sht, LazyList_RCU_SHT_cmp_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_Lazy_RCU_SHT_cmp_michaelAlloc; + typedef cc::MichaelHashSet< cds::gc::HP, LazyList_HP_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_HP_less_stdAlloc; + typedef cc::MichaelHashSet< cds::gc::DHP, LazyList_DHP_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_DHP_less_stdAlloc; + typedef cc::MichaelHashSet< rcu_gpi, LazyList_RCU_GPI_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPI_less_stdAlloc; + typedef cc::MichaelHashSet< rcu_gpb, LazyList_RCU_GPB_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPB_less_stdAlloc; + typedef cc::MichaelHashSet< rcu_gpt, LazyList_RCU_GPT_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPT_less_stdAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashSet< rcu_shb, LazyList_RCU_SHB_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_SHB_less_stdAlloc; + typedef cc::MichaelHashSet< rcu_sht, LazyList_RCU_SHT_less_stdAlloc, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_SHT_less_stdAlloc; +#endif - typedef cc::MichaelHashSet< rcu_sht, LazyList_RCU_SHT_less_stdAlloc, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_SHT_less_stdAlloc; + typedef cc::MichaelHashSet< cds::gc::HP, LazyList_HP_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_HP_less_stdAlloc_seqcst; + typedef cc::MichaelHashSet< cds::gc::DHP, LazyList_DHP_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_DHP_less_stdAlloc_seqcst; + typedef cc::MichaelHashSet< rcu_gpi, LazyList_RCU_GPI_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPI_less_stdAlloc_seqcst; + typedef cc::MichaelHashSet< rcu_gpb, LazyList_RCU_GPB_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPB_less_stdAlloc_seqcst; + typedef cc::MichaelHashSet< rcu_gpt, LazyList_RCU_GPT_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_GPT_less_stdAlloc_seqcst; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashSet< rcu_shb, LazyList_RCU_SHB_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_SHB_less_stdAlloc_seqcst; + typedef cc::MichaelHashSet< rcu_sht, LazyList_RCU_SHT_less_stdAlloc_seqcst, traits_MichaelSet_stdAlloc > MichaelSet_Lazy_RCU_SHT_less_stdAlloc_seqcst; +#endif - typedef cc::MichaelHashSet< rcu_sht, LazyList_RCU_SHT_less_stdAlloc_seqcst, - typename cc::michael_set::make_traits< - co::hash< hash > - >::type - > MichaelSet_Lazy_RCU_SHT_less_stdAlloc_seqcst; + typedef cc::MichaelHashSet< cds::gc::HP, LazyList_HP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_HP_cmp_michaelAlloc; + typedef cc::MichaelHashSet< cds::gc::DHP, LazyList_DHP_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_DHP_cmp_michaelAlloc; + typedef cc::MichaelHashSet< rcu_gpi, LazyList_RCU_GPI_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_GPI_cmp_michaelAlloc; + typedef cc::MichaelHashSet< rcu_gpb, LazyList_RCU_GPB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_GPB_cmp_michaelAlloc; + typedef cc::MichaelHashSet< rcu_gpt, LazyList_RCU_GPT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_GPT_cmp_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashSet< rcu_shb, LazyList_RCU_SHB_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_SHB_cmp_michaelAlloc; + typedef cc::MichaelHashSet< rcu_sht, LazyList_RCU_SHT_cmp_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_SHT_cmp_michaelAlloc; +#endif - typedef cc::MichaelHashSet< rcu_sht, LazyList_RCU_SHT_less_michaelAlloc, - typename cc::michael_set::make_traits< - co::hash< hash >, - co::allocator< memory::MichaelAllocator > - >::type - > MichaelSet_Lazy_RCU_SHT_less_michaelAlloc; + typedef cc::MichaelHashSet< cds::gc::HP, LazyList_HP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_HP_less_michaelAlloc; + typedef cc::MichaelHashSet< cds::gc::DHP, LazyList_DHP_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_DHP_less_michaelAlloc; + typedef cc::MichaelHashSet< rcu_gpi, LazyList_RCU_GPI_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_GPI_less_michaelAlloc; + typedef cc::MichaelHashSet< rcu_gpb, LazyList_RCU_GPB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_GPB_less_michaelAlloc; + typedef cc::MichaelHashSet< rcu_gpt, LazyList_RCU_GPT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_GPT_less_michaelAlloc; +#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED + typedef cc::MichaelHashSet< rcu_shb, LazyList_RCU_SHB_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_SHB_less_michaelAlloc; + typedef cc::MichaelHashSet< rcu_sht, LazyList_RCU_SHT_less_michaelAlloc, traits_MichaelSet_michaelAlloc > MichaelSet_Lazy_RCU_SHT_less_michaelAlloc; #endif // ***************************************************************************