3 #include "set/hdr_set.h"
4 #include <cds/urcu/signal_threaded.h>
5 #include <cds/container/michael_list_rcu.h>
6 #include <cds/container/michael_set_rcu.h>
10 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
12 typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type;
14 struct set_traits: public cc::michael_set::traits
16 typedef HashSetHdrTest::hash_int hash;
17 typedef HashSetHdrTest::simple_item_counter item_counter;
20 struct RCU_SHT_cmp_traits: public cc::michael_list::traits
22 typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
25 struct RCU_SHT_less_traits: public cc::michael_list::traits
27 typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
30 struct RCU_SHT_cmpmix_traits: public cc::michael_list::traits
32 typedef HashSetHdrTest::cmp<HashSetHdrTest::item> compare;
33 typedef HashSetHdrTest::less<HashSetHdrTest::item> less;
38 void HashSetHdrTest::Michael_RCU_SHT_cmp()
40 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
41 typedef cc::MichaelList< rcu_type, item, RCU_SHT_cmp_traits > list;
43 // traits-based version
44 typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
45 test_int_rcu_michael_list< set >();
47 // option-based version
48 typedef cc::MichaelHashSet< rcu_type, list,
49 cc::michael_set::make_traits<
50 cc::opt::hash< hash_int >
51 ,cc::opt::item_counter< simple_item_counter >
54 test_int_rcu_michael_list< opt_set >();
58 void HashSetHdrTest::Michael_RCU_SHT_less()
60 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
61 typedef cc::MichaelList< rcu_type, item, RCU_SHT_less_traits > list;
63 // traits-based version
64 typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
65 test_int_rcu_michael_list< set >();
67 // option-based version
68 typedef cc::MichaelHashSet< rcu_type, list,
69 cc::michael_set::make_traits<
70 cc::opt::hash< hash_int >
71 ,cc::opt::item_counter< simple_item_counter >
74 test_int_rcu_michael_list< opt_set >();
78 void HashSetHdrTest::Michael_RCU_SHT_cmpmix()
80 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
81 typedef cc::MichaelList< rcu_type, item, RCU_SHT_cmpmix_traits > list;
83 // traits-based version
84 typedef cc::MichaelHashSet< rcu_type, list, set_traits > set;
85 test_int_rcu_michael_list< set >();
87 // option-based version
88 typedef cc::MichaelHashSet< rcu_type, list,
89 cc::michael_set::make_traits<
90 cc::opt::hash< hash_int >
91 ,cc::opt::item_counter< simple_item_counter >
94 test_int_rcu_michael_list< opt_set >();