3 #include "ordered_list/hdr_lazy_kv.h"
4 #include <cds/urcu/general_threaded.h>
5 #include <cds/container/lazy_kvlist_rcu.h>
9 typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type;
11 struct RCU_GPT_cmp_traits : public cc::lazy_list::traits
13 typedef LazyKVListTestHeader::cmp<LazyKVListTestHeader::key_type> compare;
16 void LazyKVListTestHeader::RCU_GPT_cmp()
18 // traits-based version
19 typedef cc::LazyKVList< rcu_type, key_type, value_type, RCU_GPT_cmp_traits > list;
22 // option-based version
24 typedef cc::LazyKVList< rcu_type, key_type, value_type,
25 cc::lazy_list::make_traits<
26 cc::opt::compare< cmp<key_type> >
29 test_rcu< opt_list >();
33 struct RCU_GPT_less_traits : public cc::lazy_list::traits
35 typedef LazyKVListTestHeader::lt<LazyKVListTestHeader::key_type> less;
38 void LazyKVListTestHeader::RCU_GPT_less()
40 // traits-based version
41 typedef cc::LazyKVList< rcu_type, key_type, value_type, RCU_GPT_less_traits > list;
44 // option-based version
46 typedef cc::LazyKVList< rcu_type, key_type, value_type,
47 cc::lazy_list::make_traits<
48 cc::opt::less< lt<key_type> >
51 test_rcu< opt_list >();
55 struct RCU_GPT_cmpmix_traits : public cc::lazy_list::traits
57 typedef LazyKVListTestHeader::cmp<LazyKVListTestHeader::key_type> compare;
58 typedef LazyKVListTestHeader::lt<LazyKVListTestHeader::key_type> less;
61 void LazyKVListTestHeader::RCU_GPT_cmpmix()
63 // traits-based version
64 typedef cc::LazyKVList< rcu_type, key_type, value_type, RCU_GPT_cmpmix_traits > list;
67 // option-based version
69 typedef cc::LazyKVList< rcu_type, key_type, value_type,
70 cc::lazy_list::make_traits<
71 cc::opt::compare< cmp<key_type> >
72 ,cc::opt::less< lt<key_type> >
75 test_rcu< opt_list >();
79 struct RCU_GPT_ic_traits : public cc::lazy_list::traits
81 typedef LazyKVListTestHeader::lt<LazyKVListTestHeader::key_type> less;
82 typedef cds::atomicity::item_counter item_counter;
85 void LazyKVListTestHeader::RCU_GPT_ic()
87 // traits-based version
88 typedef cc::LazyKVList< rcu_type, key_type, value_type, RCU_GPT_ic_traits > list;
91 // option-based version
93 typedef cc::LazyKVList< rcu_type, key_type, value_type,
94 cc::lazy_list::make_traits<
95 cc::opt::less< lt<key_type> >
96 ,cc::opt::item_counter< cds::atomicity::item_counter >
99 test_rcu< opt_list >();
102 } // namespace ordlist