From 34510402837e370ecb2a7b4962ba8235ea02ee85 Mon Sep 17 00:00:00 2001 From: khizmax Date: Thu, 2 Oct 2014 12:27:17 +0400 Subject: [PATCH] Intrusive TreiberStack refactoring, removing gc::HRC specialization --- cds/intrusive/treiber_stack.h | 262 +++++++++++------- projects/Win/vc12/hdr-test-stack.vcxproj | 2 - projects/source.test-hdr.mk | 2 - .../hdr_intrusive_elimination_stack_hp.cpp | 156 ++++++----- .../hdr_intrusive_elimination_stack_hrc.cpp | 69 ----- .../hdr_intrusive_elimination_stack_ptb.cpp | 140 ++++++---- .../stack/hdr_intrusive_treiber_stack.h | 18 -- .../stack/hdr_intrusive_treiber_stack_hp.cpp | 135 +++++---- .../stack/hdr_intrusive_treiber_stack_hrc.cpp | 54 ---- .../stack/hdr_intrusive_treiber_stack_ptb.cpp | 96 ++++--- 10 files changed, 469 insertions(+), 465 deletions(-) delete mode 100644 tests/test-hdr/stack/hdr_intrusive_elimination_stack_hrc.cpp delete mode 100644 tests/test-hdr/stack/hdr_intrusive_treiber_stack_hrc.cpp diff --git a/cds/intrusive/treiber_stack.h b/cds/intrusive/treiber_stack.h index 26231583..de04aae1 100644 --- a/cds/intrusive/treiber_stack.h +++ b/cds/intrusive/treiber_stack.h @@ -145,22 +145,106 @@ namespace cds { namespace intrusive { /// TreiberStack default type traits struct traits { - typedef cds::backoff::Default back_off; ///< Back-off strategy - typedef treiber_stack::base_hook<> hook; ///< Hook used - typedef opt::v::empty_disposer disposer; ///< Node disposer - typedef atomicity::empty_item_counter item_counter; ///< Item counting feature (by default, disabled) - typedef opt::v::relaxed_ordering memory_model; ///< Memory model (by default, relaxed) - typedef treiber_stack::empty_stat stat; ///< Internal statistics (by default, no internal statistics) - static CDS_CONSTEXPR_CONST opt::link_check_type link_checker = opt::debug_check_link; ///< Link checking, see cds::opt::link_checker - - // Elimination back-off options - static CDS_CONSTEXPR_CONST bool enable_elimination = false; ///< Enable elimination (by default, it is disabled) - typedef cds::backoff::delay<> elimination_backoff; ///< Back-off strategy for elimination - typedef opt::v::static_buffer< int, 4 > buffer; ///< Elimination buffer type - typedef opt::v::c_rand random_engine; ///< Random number generator for elimination - typedef cds::lock::Spin lock_type; ///< Lock type for elimitation + /// Back-off strategy + typedef cds::backoff::Default back_off; + + /// Hook, possible types are treiber_stack::base_hook, treiber_stack::member_hook, treiber_stack::traits_hook + typedef treiber_stack::base_hook<> hook; + + /// The functor used for dispose removed items. Default is opt::v::empty_disposer. This option is used only in \ref TreiberStack::clear function + typedef opt::v::empty_disposer disposer; + + /// Item counting feature; by default, disabled + typedef cds::atomicity::empty_item_counter item_counter; + + /// C++ memory ordering model + /** + Can be opt::v::relaxed_ordering (relaxed memory model, the default) + or opt::v::sequential_consistent (sequentially consisnent memory model). + */ + typedef opt::v::relaxed_ordering memory_model; + + /// Internal statistics (by default, no internal statistics) + /** + Possible option value are: \ref treiber_stack::stat, \ref treiber_stack::empty_stat (the default), + user-provided class that supports treiber_stack::stat interface. + */ + typedef treiber_stack::empty_stat stat; + + /// Link checking, see cds::opt::link_checker + static CDS_CONSTEXPR_CONST opt::link_check_type link_checker = opt::debug_check_link; + + /** @name Elimination back-off traits + The following traits is used only if elimination enabled + */ + ///@{ + + /// Enable elimination back-off; by default, it is disabled + static CDS_CONSTEXPR_CONST bool enable_elimination = false; + + /// Back-off strategy to wait for elimination, default is cds::backoff::delay<> + typedef cds::backoff::delay<> elimination_backoff; + + /// Buffer type for elimination array + /** + Possible types are \p opt::v::static_buffer, \p opt::v::dynamic_buffer. + The buffer can be any size: \p Exp2 template parameter of those classes can be \p false. + The size should be selected empirically for your application and hardware, there are no common rules for that. + Default is %opt::v::static_buffer< any_type, 4 > . + */ + typedef opt::v::static_buffer< int, 4 > buffer; + + /// Random engine to generate a random position in elimination array + typedef opt::v::c_rand random_engine; + + /// Lock type used in elimination, default is cds::lock::Spin + typedef cds::lock::Spin lock_type; + + ///@} + }; + + /// Metafunction converting option list to \p TreiberStack traits + /** + This is a wrapper for cds::opt::make_options< type_traits, Options...> + Supported \p Options are: + + - opt::hook - hook used. Possible values are: \p treiber_stack::base_hook, \p treiber_stack::member_hook, \p treiber_stack::traits_hook. + If the option is not specified, \p %treiber_stack::base_hook<> is used. + - opt::back_off - back-off strategy used. If the option is not specified, the \p cds::backoff::Default is used. + - opt::disposer - the functor used for dispose removed items. Default is \p opt::v::empty_disposer. This option is used only + in \p TreiberStack::clear function. + - opt::link_checker - the type of node's link fields checking. Default is \ref opt::debug_check_link. + - 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). + - opt::item_counter - the type of item counting feature. Default is \p cds::atomicity::empty_item_counter + - opt::stat - the type to gather internal statistics. + Possible option value are: \p treiber_stack::stat, \p treiber_stack::empty_stat (the default), + user-provided class that supports \p treiber_stack::stat interface. + - opt::enable_elimination - enable elimination back-off for the stack. Default value is \p false. + + If elimination back-off is enabled, additional options can be specified: + - opt::buffer - a buffer type for elimination array, see \p opt::v::static_buffer, \p opt::v::dynamic_buffer. + The buffer can be any size: \p Exp2 template parameter of those classes can be \p false. + The size should be selected empirically for your application and hardware, there are no common rules for that. + Default is %opt::v::static_buffer< any_type, 4 > . + - opt::random_engine - a random engine to generate a random position in elimination array. + Default is \p opt::v::c_rand. + - opt::elimination_backoff - back-off strategy to wait for elimination, default is \p cds::backoff::delay<> + - opt::lock_type - a lock type used in elimination back-off, default is \p cds::lock::Spin. + */ + template + struct make_traits { +# ifdef CDS_DOXYGEN_INVOKED + typedef implementation_defined type; ///< Metafunction result +# else + typedef typename cds::opt::make_options< + typename cds::opt::find_type_traits< traits, Options... >::type + , Options... + >::type type; +# endif }; + //@cond namespace details { @@ -339,38 +423,19 @@ namespace cds { namespace intrusive { This approach demonstrates sufficient performance under high load. Template arguments: - - \p GC - garbage collector type: gc::HP, gc::PTB + - \p GC - garbage collector type: gc::HP, gc::PTB. + Garbage collecting schema must be consistent with the treiber_stack::node GC. - \p T - type to be inserted into the stack - - \p Options - options - - \p Options are: - - opt::hook - hook used. Possible values are: treiber_stack::base_hook, treiber_stack::member_hook, treiber_stack::traits_hook. - If the option is not specified, treiber_stack::base_hook<> is used. - - opt::back_off - back-off strategy used. If the option is not specified, the cds::backoff::Default is used. - - opt::disposer - the functor used for dispose removed items. Default is opt::v::empty_disposer. This option is used only - in \ref clear function. - - opt::link_checker - the type of node's link fields checking. Default is \ref opt::debug_check_link. - - 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::item_counter - the type of item counting feature. Default is \ref atomicity::empty_item_counter - - opt::stat - the type to gather internal statistics. - Possible option value are: \ref treiber_stack::stat, \ref treiber_stack::empty_stat (the default), - user-provided class that supports treiber_stack::stat interface. - - opt::enable_elimination - enable elimination back-off for the stack. Default value is \p valse. - - If elimination back-off is enabled (\p %cds::opt::enable_elimination< true >) additional options can be specified: - - opt::buffer - a buffer type for elimination array, see \p opt::v::static_buffer, \p opt::v::dynamic_buffer. - The buffer can be any size: \p Exp2 template parameter of those classes can be \p false. - The size should be selected empirically for your application and hardware, there are no common rules for that. - Default is %opt::v::static_buffer< any_type, 4 > . - - opt::random_engine - a random engine to generate a random position in elimination array. - Default is opt::v::c_rand. - - opt::elimination_backoff - back-off strategy to wait for elimination, default is cds::backoff::delay<> - - opt::lock_type - a lock type used in elimination back-off, default is cds::lock::Spin. - - Garbage collecting schema \p GC must be consistent with the treiber_stack::node GC. - - Be careful when you want destroy an item popped, see \ref cds_intrusive_item_destroying "Destroying items of intrusive containers". + - \p Traits - stack traits, default is \p treiber_stack::traits. You can use \p treiber_stack::make_traits + metafunction to make your traits or just derive your traits from \p %treiber_stack::traits: + \code + struct myTraits: public cds::intrusive::treiber_stack::traits { + typedef cds::intrusive::treiber_stack::stat<> stat; + }; + typedef cds::intrusive::TreiberStack< cds::gc::HP, Foo, myTraits > myStack; + \endcode + + @note Be careful when you want destroy an item popped, see \ref cds_intrusive_item_destroying "Destroying items of intrusive containers". @anchor cds_intrusive_TreiberStack_examples \par Examples @@ -398,8 +463,10 @@ namespace cds { namespace intrusive { // Stack with elimination back-off enabled typedef ci::TreiberStack< gc, myData, - ci::opt::hook< ci::treiber_stack::base_hook< gc > >, - cds::opt::enable_elimination< true > + typename ci::treiber_stack::make_traits< + ci::opt::hook< ci::treiber_stack::base_hook< gc > >, + cds::opt::enable_elimination< true > + >::type > elimination_stack_t; \endcode @@ -422,8 +489,19 @@ namespace cds { namespace intrusive { // ... }; - typedef ci::TreiberStack< gc, myData, ci::opt::hook< ci::treiber_stack::base_hook< gc, tag1 > > stack1_t; - typedef ci::TreiberStack< gc, myData, ci::opt::hook< ci::treiber_stack::base_hook< gc, tag2 > > stack2_t; + typedef ci::TreiberStack< gc, + myData, + typename ci::treiber_stack::make_traits< + ci::opt::hook< ci::treiber_stack::base_hook< gc, tag1 > > + >::type + > stack1_t; + + typedef ci::TreiberStack< gc, + myData, + typename ci::treiber_stack::make_traits< + ci::opt::hook< ci::treiber_stack::base_hook< gc, tag2 > + >::type + > stack2_t; // You may add myData objects in the objects of type stack1_t and stack2_t independently void foo() { @@ -462,82 +540,58 @@ namespace cds { namespace intrusive { // ... }; - typedef ci::TreiberStack< gc, myData, - ci::opt::hook< ci::treiber_stack::member_hook< offsetof(myData, member_hook_), gc > + typedef ci::TreiberStack< gc, + myData, + typename ci::treiber_stack::make_traits< + ci::opt::hook< ci::treiber_stack::member_hook< offsetof(myData, member_hook_), gc > + >::type > stack_t; \endcode */ - template + template class TreiberStack { - //@cond - struct default_options - { - typedef cds::backoff::Default back_off; - typedef treiber_stack::base_hook<> hook; - typedef opt::v::empty_disposer disposer; - typedef atomicity::empty_item_counter item_counter; - typedef opt::v::relaxed_ordering memory_model; - typedef treiber_stack::empty_stat stat; - static CDS_CONSTEXPR_CONST opt::link_check_type link_checker = opt::debug_check_link; - - // Elimination back-off options - static CDS_CONSTEXPR_CONST bool enable_elimination = false; - typedef cds::backoff::delay<> elimination_backoff; - typedef opt::v::static_buffer< int, 4 > buffer; - typedef opt::v::c_rand random_engine; - typedef cds::lock::Spin lock_type; - }; - //@endcond - - public: - //@cond - typedef typename opt::make_options< - typename cds::opt::find_type_traits< default_options, Options... >::type - ,Options... - >::type options; - //@endcond - public: /// Rebind template arguments - template + template struct rebind { - typedef TreiberStack< GC2, T2, Options2...> other ; ///< Rebinding result + typedef TreiberStack< GC2, T2, Traits2 > other ; ///< Rebinding result }; public: - typedef T value_type ; ///< type of value stored in the stack - typedef typename options::hook hook ; ///< hook type - typedef typename hook::node_type node_type ; ///< node type - typedef typename options::disposer disposer ; ///< disposer used - typedef typename get_node_traits< value_type, node_type, hook>::type node_traits ; ///< node traits - typedef typename single_link::get_link_checker< node_type, options::link_checker >::type link_checker ; ///< link checker - typedef typename options::memory_model memory_model ; ///< Memory ordering. See cds::opt::memory_model option - typedef typename options::item_counter item_counter ; ///< Item counting policy used - typedef typename options::stat stat ; ///< Internal statistics policy used + typedef GC gc; ///< Garbage collector + typedef T value_type; ///< type of value stored in the stack + typedef Traits traits; ///< Stack traits - typedef GC gc ; ///< Garbage collector - typedef typename options::back_off back_off ; ///< back-off strategy + typedef typename traits::hook hook; ///< hook type + typedef typename traits::node_type node_type; ///< node type + typedef typename traits::disposer disposer; ///< disposer used + typedef typename get_node_traits< value_type, node_type, hook>::type node_traits ; ///< node traits + typedef typename single_link::get_link_checker< node_type, traits::link_checker >::type link_checker ; ///< link checker + typedef typename traits::memory_model memory_model; ///< Memory ordering. See cds::opt::memory_model option + typedef typename traits::item_counter item_counter; ///< Item counting policy used + typedef typename traits::stat stat; ///< Internal statistics policy used + typedef typename traits::back_off back_off; ///< back-off strategy public: // related to elimination back-off /// Elimination back-off is enabled or not - static CDS_CONSTEXPR_CONST bool enable_elimination = options::enable_elimination; + static CDS_CONSTEXPR_CONST bool enable_elimination = traits::enable_elimination; /// back-off strategy used to wait for elimination - typedef typename options::elimination_backoff elimination_backoff_type; + typedef typename traits::elimination_backoff elimination_backoff_type; /// Lock type used in elimination back-off - typedef typename options::lock_type elimination_lock_type; + typedef typename traits::lock_type elimination_lock_type; /// Random engine used in elimination back-off - typedef typename options::random_engine elimination_random_engine; + typedef typename traits::random_engine elimination_random_engine; protected: - typename node_type::atomic_node_ptr m_Top ; ///< Top of the stack - item_counter m_ItemCounter ; ///< Item counter - stat m_stat ; ///< Internal statistics + typename node_type::atomic_node_ptr m_Top; ///< Top of the stack + item_counter m_ItemCounter; ///< Item counter + stat m_stat; ///< Internal statistics //@cond - treiber_stack::details::elimination_backoff m_Backoff; + treiber_stack::details::elimination_backoff m_Backoff; typedef intrusive::node_to_value node_to_value; typedef treiber_stack::operation< value_type > operation_desc; @@ -585,6 +639,7 @@ namespace cds { namespace intrusive { init(); } + /// %TreiberStack is not copy-constructible TreiberStack( TreiberStack const& ) = delete; /// Destructor calls \ref cds_intrusive_TreiberStack_clear "clear" member function @@ -673,8 +728,7 @@ namespace cds { namespace intrusive { /** @anchor cds_intrusive_TreiberStack_clear For each removed item the disposer is called. - Caution - It is possible that after clear() the empty() returns \p false + @note It is possible that after clear() the empty() returns \p false if some other thread pushes an item into the stack during \p clear works */ void clear() @@ -705,7 +759,7 @@ namespace cds { namespace intrusive { 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 stack + @warning Even if you use real item counter and it returns 0, this fact is not mean that the stack is empty. To check emptyness use \ref empty() method. */ size_t size() const diff --git a/projects/Win/vc12/hdr-test-stack.vcxproj b/projects/Win/vc12/hdr-test-stack.vcxproj index a923671f..f9098a5b 100644 --- a/projects/Win/vc12/hdr-test-stack.vcxproj +++ b/projects/Win/vc12/hdr-test-stack.vcxproj @@ -544,11 +544,9 @@ - - diff --git a/projects/source.test-hdr.mk b/projects/source.test-hdr.mk index 1f4a0180..4013baf9 100644 --- a/projects/source.test-hdr.mk +++ b/projects/source.test-hdr.mk @@ -242,8 +242,6 @@ CDS_TESTHDR_SET := \ tests/test-hdr/set/hdr_striped_hashset_vector.cpp CDS_TESTHDR_STACK := \ - tests/test-hdr/stack/hdr_intrusive_treiber_stack_hrc.cpp \ - tests/test-hdr/stack/hdr_intrusive_elimination_stack_hrc.cpp \ tests/test-hdr/stack/hdr_intrusive_fcstack.cpp \ tests/test-hdr/stack/hdr_treiber_stack_hp.cpp \ tests/test-hdr/stack/hdr_treiber_stack_hrc.cpp \ diff --git a/tests/test-hdr/stack/hdr_intrusive_elimination_stack_hp.cpp b/tests/test-hdr/stack/hdr_intrusive_elimination_stack_hp.cpp index 1a86bc33..f3c30e08 100644 --- a/tests/test-hdr/stack/hdr_intrusive_elimination_stack_hp.cpp +++ b/tests/test-hdr/stack/hdr_intrusive_elimination_stack_hp.cpp @@ -12,128 +12,152 @@ namespace stack { namespace defs { typedef cds::intrusive::TreiberStack< cds::gc::HP, TestIntrusiveStack::base_hook_item - ,cds::opt::enable_elimination + , typename ci::treiber_stack::make_traits< + cds::opt::enable_elimination + >::type > Elimination_HP_default; typedef cds::intrusive::TreiberStack< cds::gc::HP, TestIntrusiveStack::base_hook_item - ,cds::opt::enable_elimination - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + , typename ci::treiber_stack::make_traits< + cds::opt::enable_elimination + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type > Elimination_HP_default_relaxed; // HZP GC + base hook typedef cds::intrusive::TreiberStack< cds::gc::HP, TestIntrusiveStack::base_hook_item - ,cds::opt::enable_elimination - ,ci::opt::hook< - ci::single_link::base_hook< - ci::opt::gc + , typename ci::treiber_stack::make_traits< + cds::opt::enable_elimination + ,ci::opt::hook< + ci::single_link::base_hook< + ci::opt::gc + > > - > + >::type > Elimination_HP_base; typedef cds::intrusive::TreiberStack< cds::gc::HP, TestIntrusiveStack::base_hook_item - ,cds::opt::enable_elimination - ,ci::opt::hook< - ci::single_link::base_hook< - ci::opt::gc + , typename ci::treiber_stack::make_traits< + cds::opt::enable_elimination + ,ci::opt::hook< + ci::single_link::base_hook< + ci::opt::gc + > > - > - ,ci::opt::buffer< ci::opt::v::dynamic_buffer > + ,ci::opt::buffer< ci::opt::v::dynamic_buffer > + >::type > Elimination_HP_base_dyn; typedef cds::intrusive::TreiberStack< cds::gc::HP, TestIntrusiveStack::base_hook_item - ,cds::opt::enable_elimination - ,ci::opt::hook< - ci::single_link::base_hook< - ci::opt::gc + , typename ci::treiber_stack::make_traits< + cds::opt::enable_elimination + ,ci::opt::hook< + ci::single_link::base_hook< + ci::opt::gc + > > - > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type > Elimination_HP_base_relaxed; // HZP GC + base hook + disposer typedef cds::intrusive::TreiberStack< cds::gc::HP, TestIntrusiveStack::base_hook_item - ,cds::opt::enable_elimination - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + , typename ci::treiber_stack::make_traits< + cds::opt::enable_elimination + ,ci::opt::hook< + ci::single_link::base_hook< ci::opt::gc > + > + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + >::type > Elimination_HP_base_disposer; typedef cds::intrusive::TreiberStack< cds::gc::HP, TestIntrusiveStack::base_hook_item - ,cds::opt::enable_elimination - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + , typename ci::treiber_stack::make_traits< + cds::opt::enable_elimination + ,ci::opt::hook< + ci::single_link::base_hook< ci::opt::gc > + > + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type > Elimination_HP_base_disposer_relaxed; // HZP GC + member hook typedef cds::intrusive::TreiberStack< cds::gc::HP, TestIntrusiveStack::member_hook_item - ,cds::opt::enable_elimination - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + , typename ci::treiber_stack::make_traits< + cds::opt::enable_elimination + ,ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > + >::type > Elimination_HP_member; typedef cds::intrusive::TreiberStack< cds::gc::HP, TestIntrusiveStack::member_hook_item - ,cds::opt::enable_elimination - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + , typename ci::treiber_stack::make_traits< + cds::opt::enable_elimination + ,ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > - ,ci::opt::buffer< ci::opt::v::dynamic_buffer > + ,ci::opt::buffer< ci::opt::v::dynamic_buffer > + >::type > Elimination_HP_member_dyn; typedef cds::intrusive::TreiberStack< cds::gc::HP, TestIntrusiveStack::member_hook_item - ,cds::opt::enable_elimination - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + , typename ci::treiber_stack::make_traits< + cds::opt::enable_elimination + ,ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type > Elimination_HP_member_relaxed; // HZP GC + member hook + disposer typedef cds::intrusive::TreiberStack< cds::gc::HP, TestIntrusiveStack::member_hook_item - ,cds::opt::enable_elimination - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + , typename ci::treiber_stack::make_traits< + cds::opt::enable_elimination + ,ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + >::type > Elimination_HP_member_disposer; typedef cds::intrusive::TreiberStack< cds::gc::HP, TestIntrusiveStack::member_hook_item - ,cds::opt::enable_elimination - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + , typename ci::treiber_stack::make_traits< + cds::opt::enable_elimination + ,ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type > Elimination_HP_member_disposer_relaxed; } diff --git a/tests/test-hdr/stack/hdr_intrusive_elimination_stack_hrc.cpp b/tests/test-hdr/stack/hdr_intrusive_elimination_stack_hrc.cpp deleted file mode 100644 index 46151105..00000000 --- a/tests/test-hdr/stack/hdr_intrusive_elimination_stack_hrc.cpp +++ /dev/null @@ -1,69 +0,0 @@ -//$$CDS-header$$ - -#include "hdr_intrusive_treiber_stack.h" -#include -#include - -namespace stack { - -#define TEST(X) void TestIntrusiveStack::X() { test(); } -#define TEST_DYN(X) void TestIntrusiveStack::X() { test_elimination(); } - - namespace defs { - // HRC GC - typedef cds::intrusive::TreiberStack< cds::gc::HRC, - TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,cds::opt::enable_elimination - > Elimination_HRC_base; - - typedef cds::intrusive::TreiberStack< cds::gc::HRC, - TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,cds::opt::enable_elimination - ,ci::opt::buffer< ci::opt::v::dynamic_buffer > - > Elimination_HRC_base_dyn; - - typedef cds::intrusive::TreiberStack< cds::gc::HRC, - TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,cds::opt::enable_elimination - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > - > Elimination_HRC_base_relaxed; - - // HRC GC + disposer - typedef cds::intrusive::TreiberStack< cds::gc::HRC, - TestIntrusiveStack::base_hook_item - ,cds::opt::enable_elimination - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > - > Elimination_HRC_base_disposer; - - typedef cds::intrusive::TreiberStack< cds::gc::HRC, - TestIntrusiveStack::base_hook_item - ,cds::opt::enable_elimination - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > - > Elimination_HRC_base_disposer_relaxed; - } - - TEST(Elimination_HRC_base) - TEST_DYN(Elimination_HRC_base_dyn) - TEST(Elimination_HRC_base_disposer) - - TEST(Elimination_HRC_base_relaxed) - TEST(Elimination_HRC_base_disposer_relaxed) - -} // namespace stack - diff --git a/tests/test-hdr/stack/hdr_intrusive_elimination_stack_ptb.cpp b/tests/test-hdr/stack/hdr_intrusive_elimination_stack_ptb.cpp index 688581d2..351f55bb 100644 --- a/tests/test-hdr/stack/hdr_intrusive_elimination_stack_ptb.cpp +++ b/tests/test-hdr/stack/hdr_intrusive_elimination_stack_ptb.cpp @@ -13,110 +13,130 @@ namespace stack { // PTB GC + base hook typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::base_hook_item - ,cds::opt::enable_elimination - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > + , typename ci::treiber_stack::make_traits< + cds::opt::enable_elimination + ,ci::opt::hook< + ci::single_link::base_hook< ci::opt::gc > + > + >::type > Elimination_PTB_base; typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,cds::opt::enable_elimination - ,ci::opt::buffer< ci::opt::v::dynamic_buffer > + , typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::base_hook< ci::opt::gc > + > + ,cds::opt::enable_elimination + ,ci::opt::buffer< ci::opt::v::dynamic_buffer > + >::type > Elimination_PTB_base_dyn; typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,cds::opt::enable_elimination - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + , typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::base_hook< ci::opt::gc > + > + ,cds::opt::enable_elimination + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type > Elimination_PTB_base_relaxed; // PTB GC + base hook + disposer typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,cds::opt::enable_elimination - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + , typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::base_hook< ci::opt::gc > + > + ,cds::opt::enable_elimination + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + >::type > Elimination_PTB_base_disposer; typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,cds::opt::enable_elimination - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + , typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::base_hook< ci::opt::gc > + > + ,cds::opt::enable_elimination + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type > Elimination_PTB_base_disposer_relaxed; // PTB GC + member hook typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::member_hook_item - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + , typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > - ,cds::opt::enable_elimination + ,cds::opt::enable_elimination + >::type > Elimination_PTB_member; typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::member_hook_item - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + , typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > - ,cds::opt::enable_elimination - ,ci::opt::buffer< ci::opt::v::dynamic_buffer > + ,cds::opt::enable_elimination + ,ci::opt::buffer< ci::opt::v::dynamic_buffer > + >::type > Elimination_PTB_member_dyn; typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::member_hook_item - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + , typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > - ,cds::opt::enable_elimination - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + ,cds::opt::enable_elimination + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type > Elimination_PTB_member_relaxed; // PTB GC + member hook + disposer typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::member_hook_item - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + , typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > - ,cds::opt::enable_elimination - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + ,cds::opt::enable_elimination + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + >::type > Elimination_PTB_member_disposer; typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::member_hook_item - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + , typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > - ,cds::opt::enable_elimination - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + ,cds::opt::enable_elimination + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type > Elimination_PTB_member_disposer_relaxed; } diff --git a/tests/test-hdr/stack/hdr_intrusive_treiber_stack.h b/tests/test-hdr/stack/hdr_intrusive_treiber_stack.h index 5d3f312d..6e86196f 100644 --- a/tests/test-hdr/stack/hdr_intrusive_treiber_stack.h +++ b/tests/test-hdr/stack/hdr_intrusive_treiber_stack.h @@ -115,8 +115,6 @@ namespace stack { void Treiber_HP_base_disposer(); void Treiber_HP_member(); void Treiber_HP_member_disposer(); - void Treiber_HRC_base(); - void Treiber_HRC_base_disposer(); void Treiber_PTB_base(); void Treiber_PTB_base_disposer(); void Treiber_PTB_member(); @@ -127,8 +125,6 @@ namespace stack { void Treiber_HP_base_disposer_relaxed(); void Treiber_HP_member_relaxed(); void Treiber_HP_member_disposer_relaxed(); - void Treiber_HRC_base_relaxed(); - void Treiber_HRC_base_disposer_relaxed(); void Treiber_PTB_base_relaxed(); void Treiber_PTB_base_disposer_relaxed(); void Treiber_PTB_member_relaxed(); @@ -141,9 +137,6 @@ namespace stack { void Elimination_HP_member(); void Elimination_HP_member_dyn(); void Elimination_HP_member_disposer(); - void Elimination_HRC_base(); - void Elimination_HRC_base_dyn(); - void Elimination_HRC_base_disposer(); void Elimination_PTB_base(); void Elimination_PTB_base_dyn(); void Elimination_PTB_base_disposer(); @@ -156,8 +149,6 @@ namespace stack { void Elimination_HP_base_disposer_relaxed(); void Elimination_HP_member_relaxed(); void Elimination_HP_member_disposer_relaxed(); - void Elimination_HRC_base_relaxed(); - void Elimination_HRC_base_disposer_relaxed(); void Elimination_PTB_base_relaxed(); void Elimination_PTB_base_disposer_relaxed(); void Elimination_PTB_member_relaxed(); @@ -174,10 +165,6 @@ namespace stack { CPPUNIT_TEST(Treiber_HP_member_relaxed) CPPUNIT_TEST(Treiber_HP_member_disposer) CPPUNIT_TEST(Treiber_HP_member_disposer_relaxed) - CPPUNIT_TEST(Treiber_HRC_base) - CPPUNIT_TEST(Treiber_HRC_base_relaxed) - CPPUNIT_TEST(Treiber_HRC_base_disposer) - CPPUNIT_TEST(Treiber_HRC_base_disposer_relaxed) CPPUNIT_TEST(Treiber_PTB_base) CPPUNIT_TEST(Treiber_PTB_base_relaxed) CPPUNIT_TEST(Treiber_PTB_base_disposer) @@ -199,11 +186,6 @@ namespace stack { CPPUNIT_TEST(Elimination_HP_member_relaxed) CPPUNIT_TEST(Elimination_HP_member_disposer) CPPUNIT_TEST(Elimination_HP_member_disposer_relaxed) - CPPUNIT_TEST(Elimination_HRC_base) - CPPUNIT_TEST(Elimination_HRC_base_dyn) - CPPUNIT_TEST(Elimination_HRC_base_relaxed) - CPPUNIT_TEST(Elimination_HRC_base_disposer) - CPPUNIT_TEST(Elimination_HRC_base_disposer_relaxed) CPPUNIT_TEST(Elimination_PTB_base) CPPUNIT_TEST(Elimination_PTB_base_dyn) CPPUNIT_TEST(Elimination_PTB_base_relaxed) diff --git a/tests/test-hdr/stack/hdr_intrusive_treiber_stack_hp.cpp b/tests/test-hdr/stack/hdr_intrusive_treiber_stack_hp.cpp index cc73b7c9..3a982452 100644 --- a/tests/test-hdr/stack/hdr_intrusive_treiber_stack_hp.cpp +++ b/tests/test-hdr/stack/hdr_intrusive_treiber_stack_hp.cpp @@ -15,7 +15,9 @@ namespace stack { typedef cds::intrusive::TreiberStack< cds::gc::HP, TestIntrusiveStack::base_hook_item - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + , typename ci::treiber_stack::make_traits< + ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type > Treiber_HP_default_relaxed; // HZP GC + base hook @@ -27,78 +29,111 @@ namespace stack { > > > Treiber_HP_base; - typedef cds::intrusive::TreiberStack< cds::gc::HP, - TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< - ci::opt::gc + + struct traits_Treiber_HP_base_relaxed + : ci::treiber_stack::make_traits < + ci::opt::hook< + ci::single_link::base_hook< + ci::opt::gc + > > - > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + > ::type + {}; + typedef cds::intrusive::TreiberStack< cds::gc::HP, + TestIntrusiveStack::base_hook_item, + traits_Treiber_HP_base_relaxed > Treiber_HP_base_relaxed; // HZP GC + base hook + disposer + struct traits_Treiber_HP_base_disposer + : ci::treiber_stack::make_traits < + ci::opt::hook< + ci::single_link::base_hook< ci::opt::gc > + > + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + >::type + {}; typedef cds::intrusive::TreiberStack< cds::gc::HP, - TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + TestIntrusiveStack::base_hook_item, + traits_Treiber_HP_base_disposer > Treiber_HP_base_disposer; typedef cds::intrusive::TreiberStack< cds::gc::HP, TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + ,typename ci::treiber_stack::make_traits < + ci::opt::hook< + ci::single_link::base_hook< ci::opt::gc > + > + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type > Treiber_HP_base_disposer_relaxed; // HZP GC + member hook - typedef cds::intrusive::TreiberStack< cds::gc::HP, - TestIntrusiveStack::member_hook_item - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + struct traits_Treiber_HP_member + : ci::treiber_stack::make_traits < + ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > + > ::type + {}; + typedef cds::intrusive::TreiberStack< cds::gc::HP, + TestIntrusiveStack::member_hook_item, + traits_Treiber_HP_member > Treiber_HP_member; - typedef cds::intrusive::TreiberStack< cds::gc::HP, - TestIntrusiveStack::member_hook_item - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + struct traits_Treiber_HP_member_relaxed + : ci::treiber_stack::make_traits < + ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type + {}; + typedef cds::intrusive::TreiberStack< cds::gc::HP, + TestIntrusiveStack::member_hook_item, + traits_Treiber_HP_member_relaxed > Treiber_HP_member_relaxed; // HZP GC + member hook + disposer - typedef cds::intrusive::TreiberStack< cds::gc::HP, - TestIntrusiveStack::member_hook_item - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + struct traits_Treiber_HP_member_disposer + : ci::treiber_stack::make_traits < + ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + >::type + {}; + typedef cds::intrusive::TreiberStack< cds::gc::HP, + TestIntrusiveStack::member_hook_item, + traits_Treiber_HP_member_disposer > Treiber_HP_member_disposer; - typedef cds::intrusive::TreiberStack< cds::gc::HP, - TestIntrusiveStack::member_hook_item - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + struct traits_Treiber_HP_member_disposer_relaxed + : ci::treiber_stack::make_traits < + ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type + {}; + typedef cds::intrusive::TreiberStack< cds::gc::HP, + TestIntrusiveStack::member_hook_item, + traits_Treiber_HP_member_disposer_relaxed > Treiber_HP_member_disposer_relaxed; }} diff --git a/tests/test-hdr/stack/hdr_intrusive_treiber_stack_hrc.cpp b/tests/test-hdr/stack/hdr_intrusive_treiber_stack_hrc.cpp deleted file mode 100644 index a6746b9d..00000000 --- a/tests/test-hdr/stack/hdr_intrusive_treiber_stack_hrc.cpp +++ /dev/null @@ -1,54 +0,0 @@ -//$$CDS-header$$ - -#include "hdr_intrusive_treiber_stack.h" -#include -#include - -namespace stack { - -#define TEST(X) void TestIntrusiveStack::X() { test(); } - - namespace defs { - // HRC GC - typedef cds::intrusive::TreiberStack< cds::gc::HRC, - TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - > Treiber_HRC_base; - - typedef cds::intrusive::TreiberStack< cds::gc::HRC, - TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > - > Treiber_HRC_base_relaxed; - - // HRC GC + disposer - typedef cds::intrusive::TreiberStack< cds::gc::HRC, - TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > - > Treiber_HRC_base_disposer; - - typedef cds::intrusive::TreiberStack< cds::gc::HRC, - TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > - > Treiber_HRC_base_disposer_relaxed; - } - - TEST(Treiber_HRC_base) - TEST(Treiber_HRC_base_disposer) - - TEST(Treiber_HRC_base_relaxed) - TEST(Treiber_HRC_base_disposer_relaxed) - -} // namespace stack - diff --git a/tests/test-hdr/stack/hdr_intrusive_treiber_stack_ptb.cpp b/tests/test-hdr/stack/hdr_intrusive_treiber_stack_ptb.cpp index 9337c566..b1cdb519 100644 --- a/tests/test-hdr/stack/hdr_intrusive_treiber_stack_ptb.cpp +++ b/tests/test-hdr/stack/hdr_intrusive_treiber_stack_ptb.cpp @@ -12,81 +12,97 @@ namespace stack { // PTB GC + base hook typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > + ,typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::base_hook< ci::opt::gc > + > + >::type > Treiber_PTB_base; typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + ,typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::base_hook< ci::opt::gc > + > + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type > Treiber_PTB_base_relaxed; // PTB GC + base hook + disposer typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + ,typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::base_hook< ci::opt::gc > + > + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + >::type > Treiber_PTB_base_disposer; typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::base_hook_item - ,ci::opt::hook< - ci::single_link::base_hook< ci::opt::gc > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + ,typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::base_hook< ci::opt::gc > + > + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type > Treiber_PTB_base_disposer_relaxed; // PTB GC + member hook typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::member_hook_item - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + ,typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > + >::type > Treiber_PTB_member; typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::member_hook_item - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + ,typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type > Treiber_PTB_member_relaxed; // PTB GC + member hook + disposer typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::member_hook_item - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + , typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + >::type > Treiber_PTB_member_disposer; typedef cds::intrusive::TreiberStack< cds::gc::PTB, TestIntrusiveStack::member_hook_item - ,ci::opt::hook< - ci::single_link::member_hook< - offsetof(TestIntrusiveStack::member_hook_item, hMember), - ci::opt::gc + , typename ci::treiber_stack::make_traits< + ci::opt::hook< + ci::single_link::member_hook< + offsetof(TestIntrusiveStack::member_hook_item, hMember), + ci::opt::gc + > > - > - ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > - ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + ,ci::opt::disposer< TestIntrusiveStack::faked_disposer > + ,ci::opt::memory_model< ci::opt::v::relaxed_ordering > + >::type > Treiber_PTB_member_disposer_relaxed; } -- 2.34.1