3 #include "map/hdr_map.h"
4 #include <cds/urcu/signal_threaded.h>
5 #include <cds/container/michael_kvlist_rcu.h>
6 #include <cds/container/michael_map_rcu.h>
9 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
11 struct map_traits: public cc::michael_map::traits
13 typedef HashMapHdrTest::hash_int hash;
14 typedef HashMapHdrTest::simple_item_counter item_counter;
16 typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type;
18 struct RCU_SHT_cmp_traits: public cc::michael_list::traits
20 typedef HashMapHdrTest::cmp compare;
23 struct RCU_SHT_less_traits: public cc::michael_list::traits
25 typedef HashMapHdrTest::less less;
28 struct RCU_SHT_cmpmix_traits: public cc::michael_list::traits
30 typedef HashMapHdrTest::cmp compare;
31 typedef HashMapHdrTest::less less;
36 void HashMapHdrTest::Michael_RCU_SHT_cmp()
38 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
39 typedef cc::MichaelKVList< rcu_type, int, HashMapHdrTest::value_type, RCU_SHT_cmp_traits > list;
41 // traits-based version
42 typedef cc::MichaelHashMap< rcu_type, list, map_traits > map;
45 // option-based version
46 typedef cc::MichaelHashMap< rcu_type, list,
47 cc::michael_map::make_traits<
48 cc::opt::hash< hash_int >
49 ,cc::opt::item_counter< simple_item_counter >
52 test_rcu< opt_map >();
56 void HashMapHdrTest::Michael_RCU_SHT_less()
58 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
59 typedef cc::MichaelKVList< rcu_type, int, HashMapHdrTest::value_type, RCU_SHT_less_traits > list;
61 // traits-based version
62 typedef cc::MichaelHashMap< rcu_type, list, map_traits > map;
65 // option-based version
66 typedef cc::MichaelHashMap< rcu_type, list,
67 cc::michael_map::make_traits<
68 cc::opt::hash< hash_int >
69 ,cc::opt::item_counter< simple_item_counter >
72 test_rcu< opt_map >();
76 void HashMapHdrTest::Michael_RCU_SHT_cmpmix()
78 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
79 typedef cc::MichaelKVList< rcu_type, int, HashMapHdrTest::value_type, RCU_SHT_cmpmix_traits > list;
81 // traits-based version
82 typedef cc::MichaelHashMap< rcu_type, list, map_traits > map;
85 // option-based version
86 typedef cc::MichaelHashMap< rcu_type, list,
87 cc::michael_map::make_traits<
88 cc::opt::hash< hash_int >
89 ,cc::opt::item_counter< simple_item_counter >
92 test_rcu< opt_map >();