3 #include "list/hdr_lazy.h"
4 #include <cds/urcu/general_buffered.h>
5 #include <cds/container/lazy_list_rcu.h>
9 typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type;
11 struct RCU_GPB_cmp_traits : public cc::lazy_list::traits
13 typedef LazyListTestHeader::cmp<LazyListTestHeader::item> compare;
16 void LazyListTestHeader::RCU_GPB_cmp()
18 // traits-based version
19 typedef cc::LazyList< rcu_type, item, RCU_GPB_cmp_traits > list;
22 // option-based version
24 typedef cc::LazyList< rcu_type, item,
25 cc::lazy_list::make_traits<
26 cc::opt::compare< cmp<item> >
29 test_rcu< opt_list >();
33 struct RCU_GPB_less_traits : public cc::lazy_list::traits
35 typedef LazyListTestHeader::lt<LazyListTestHeader::item> less;
38 void LazyListTestHeader::RCU_GPB_less()
40 // traits-based version
41 typedef cc::LazyList< rcu_type, item, RCU_GPB_less_traits > list;
44 // option-based version
46 typedef cc::LazyList< rcu_type, item,
47 cc::lazy_list::make_traits<
48 cc::opt::less< lt<item> >
51 test_rcu< opt_list >();
55 struct RCU_GPB_cmpmix_traits : public cc::lazy_list::traits
57 typedef LazyListTestHeader::cmp<LazyListTestHeader::item> compare;
58 typedef LazyListTestHeader::lt<LazyListTestHeader::item> less;
61 void LazyListTestHeader::RCU_GPB_cmpmix()
63 // traits-based version
64 typedef cc::LazyList< rcu_type, item, RCU_GPB_cmpmix_traits > list;
67 // option-based version
69 typedef cc::LazyList< rcu_type, item,
70 cc::lazy_list::make_traits<
71 cc::opt::compare< cmp<item> >
72 ,cc::opt::less< lt<item> >
75 test_rcu< opt_list >();
79 struct RCU_GPB_ic_traits : public cc::lazy_list::traits
81 typedef LazyListTestHeader::lt<LazyListTestHeader::item> less;
82 typedef cds::atomicity::item_counter item_counter;
85 void LazyListTestHeader::RCU_GPB_ic()
87 // traits-based version
88 typedef cc::LazyList< rcu_type, item, RCU_GPB_ic_traits > list;
91 // option-based version
93 typedef cc::LazyList< rcu_type, item,
94 cc::lazy_list::make_traits<
95 cc::opt::less< lt<item> >
96 ,cc::opt::item_counter< cds::atomicity::item_counter >
99 test_rcu< opt_list >();
102 } // namespace ordlist