3 #include "ordered_list/hdr_lazy_kv.h"
4 #include <cds/urcu/signal_threaded.h>
5 #include <cds/container/lazy_kvlist_rcu.h>
8 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
10 typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_type;
12 struct RCU_SHT_cmp_traits : public cc::lazy_list::traits
14 typedef LazyKVListTestHeader::cmp<LazyKVListTestHeader::key_type> compare;
18 void LazyKVListTestHeader::RCU_SHT_cmp()
20 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
21 // traits-based version
22 typedef cc::LazyKVList< rcu_type, key_type, value_type, RCU_SHT_cmp_traits > list;
25 // option-based version
27 typedef cc::LazyKVList< rcu_type, key_type, value_type,
28 cc::lazy_list::make_traits<
29 cc::opt::compare< cmp<key_type> >
32 test_rcu< opt_list >();
36 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
38 struct RCU_SHT_less_traits : public cc::lazy_list::traits
40 typedef LazyKVListTestHeader::lt<LazyKVListTestHeader::key_type> less;
44 void LazyKVListTestHeader::RCU_SHT_less()
46 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
47 // traits-based version
48 typedef cc::LazyKVList< rcu_type, key_type, value_type, RCU_SHT_less_traits > list;
51 // option-based version
53 typedef cc::LazyKVList< rcu_type, key_type, value_type,
54 cc::lazy_list::make_traits<
55 cc::opt::less< lt<key_type> >
58 test_rcu< opt_list >();
62 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
64 struct RCU_SHT_cmpmix_traits: public cc::lazy_list::traits
66 typedef LazyKVListTestHeader::cmp<LazyKVListTestHeader::key_type> compare;
67 typedef LazyKVListTestHeader::lt<LazyKVListTestHeader::key_type> less;
71 void LazyKVListTestHeader::RCU_SHT_cmpmix()
73 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
74 // traits-based version
75 typedef cc::LazyKVList< rcu_type, key_type, value_type, RCU_SHT_cmpmix_traits > list;
78 // option-based version
80 typedef cc::LazyKVList< rcu_type, key_type, value_type,
81 cc::lazy_list::make_traits<
82 cc::opt::compare< cmp<key_type> >
83 ,cc::opt::less< lt<key_type> >
86 test_rcu< opt_list >();
90 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
92 struct RCU_SHT_ic_traits: public cc::lazy_list::traits
94 typedef LazyKVListTestHeader::lt<LazyKVListTestHeader::key_type> less;
95 typedef cds::atomicity::item_counter item_counter;
99 void LazyKVListTestHeader::RCU_SHT_ic()
101 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
102 // traits-based version
103 typedef cc::LazyKVList< rcu_type, key_type, value_type, RCU_SHT_ic_traits > list;
106 // option-based version
108 typedef cc::LazyKVList< rcu_type, key_type, value_type,
109 cc::lazy_list::make_traits<
110 cc::opt::less< lt<key_type> >
111 ,cc::opt::item_counter< cds::atomicity::item_counter >
114 test_rcu< opt_list >();
118 } // namespace ordlist