3 #include "ordered_list/hdr_lazy_kv.h"
4 #include <cds/urcu/signal_buffered.h>
5 #include <cds/container/lazy_kvlist_rcu.h>
8 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
10 typedef cds::urcu::gc< cds::urcu::signal_buffered<> > rcu_type;
12 struct RCU_SHB_cmp_traits : public cc::lazy_list::traits
14 typedef LazyKVListTestHeader::cmp<LazyKVListTestHeader::key_type> compare;
19 void LazyKVListTestHeader::RCU_SHB_cmp()
21 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
22 // traits-based version
23 typedef cc::LazyKVList< rcu_type, key_type, value_type, RCU_SHB_cmp_traits > list;
26 // option-based version
28 typedef cc::LazyKVList< rcu_type, key_type, value_type,
29 cc::lazy_list::make_traits<
30 cc::opt::compare< cmp<key_type> >
33 test_rcu< opt_list >();
37 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
39 struct RCU_SHB_less_traits: public cc::lazy_list::traits
41 typedef LazyKVListTestHeader::lt<LazyKVListTestHeader::key_type> less;
46 void LazyKVListTestHeader::RCU_SHB_less()
48 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
49 // traits-based version
50 typedef cc::LazyKVList< rcu_type, key_type, value_type, RCU_SHB_less_traits > list;
53 // option-based version
55 typedef cc::LazyKVList< rcu_type, key_type, value_type,
56 cc::lazy_list::make_traits<
57 cc::opt::less< lt<key_type> >
60 test_rcu< opt_list >();
64 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
66 struct RCU_SHB_cmpmix_traits: public cc::lazy_list::traits
68 typedef LazyKVListTestHeader::cmp<LazyKVListTestHeader::key_type> compare;
69 typedef LazyKVListTestHeader::lt<LazyKVListTestHeader::key_type> less;
74 void LazyKVListTestHeader::RCU_SHB_cmpmix()
76 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
77 // traits-based version
78 typedef cc::LazyKVList< rcu_type, key_type, value_type, RCU_SHB_cmpmix_traits > list;
81 // option-based version
83 typedef cc::LazyKVList< rcu_type, key_type, value_type,
84 cc::lazy_list::make_traits<
85 cc::opt::compare< cmp<key_type> >
86 ,cc::opt::less< lt<key_type> >
89 test_rcu< opt_list >();
93 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
95 struct RCU_SHB_ic_traits: public cc::lazy_list::traits
97 typedef LazyKVListTestHeader::lt<LazyKVListTestHeader::key_type> less;
98 typedef cds::atomicity::item_counter item_counter;
103 void LazyKVListTestHeader::RCU_SHB_ic()
105 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
106 // traits-based version
107 typedef cc::LazyKVList< rcu_type, key_type, value_type, RCU_SHB_ic_traits > list;
110 // option-based version
112 typedef cc::LazyKVList< rcu_type, key_type, value_type,
113 cc::lazy_list::make_traits<
114 cc::opt::less< lt<key_type> >
115 ,cc::opt::item_counter< cds::atomicity::item_counter >
118 test_rcu< opt_list >();
122 } // namespace ordlist