3 #include "list/hdr_intrusive_michael.h"
4 #include <cds/urcu/general_instant.h>
5 #include <cds/intrusive/michael_list_rcu.h>
9 typedef cds::urcu::gc< cds::urcu::general_instant<> > RCU;
12 void IntrusiveMichaelListHeaderTest::RCU_GPI_base_cmp()
14 typedef base_int_item< RCU > item;
15 struct traits : public ci::michael_list::traits
17 typedef ci::michael_list::base_hook< co::gc<RCU> > hook;
18 typedef cmp<item> compare;
19 typedef faked_disposer disposer;
21 typedef ci::MichaelList< RCU, item, traits > list;
24 void IntrusiveMichaelListHeaderTest::RCU_GPI_base_less()
26 typedef base_int_item< RCU > item;
27 struct traits : public ci::michael_list::traits
29 typedef ci::michael_list::base_hook< co::gc<RCU> > hook;
30 typedef IntrusiveMichaelListHeaderTest::less<item> less;
31 typedef faked_disposer disposer;
33 typedef ci::MichaelList< RCU, item, traits > list;
36 void IntrusiveMichaelListHeaderTest::RCU_GPI_base_cmpmix()
38 typedef base_int_item< RCU > item;
39 typedef ci::MichaelList< RCU
41 ,ci::michael_list::make_traits<
42 ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
43 ,co::less< less<item> >
44 ,co::compare< cmp<item> >
45 ,ci::opt::disposer< faked_disposer >
50 void IntrusiveMichaelListHeaderTest::RCU_GPI_base_ic()
52 typedef base_int_item< RCU > item;
53 typedef ci::MichaelList< RCU
55 ,ci::michael_list::make_traits<
56 ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
57 ,co::less< less<item> >
58 ,co::compare< cmp<item> >
59 ,ci::opt::disposer< faked_disposer >
60 ,co::item_counter< cds::atomicity::item_counter >
65 void IntrusiveMichaelListHeaderTest::RCU_GPI_member_cmp()
67 typedef member_int_item< RCU > item;
69 ci::michael_list::make_traits<
70 ci::opt::hook< ci::michael_list::member_hook<
71 offsetof( item, hMember ),
74 ,co::compare< cmp<item> >
75 ,ci::opt::disposer< faked_disposer >
78 typedef ci::MichaelList< RCU, item, traits > list;
81 void IntrusiveMichaelListHeaderTest::RCU_GPI_member_less()
83 typedef member_int_item< RCU > item;
85 ci::michael_list::make_traits<
86 ci::opt::hook< ci::michael_list::member_hook<
87 offsetof( item, hMember ),
90 ,co::less< less<item> >
91 ,ci::opt::disposer< faked_disposer >
94 typedef ci::MichaelList< RCU, item, traits > list;
97 void IntrusiveMichaelListHeaderTest::RCU_GPI_member_cmpmix()
99 typedef member_int_item< RCU > item;
100 struct traits: public
101 ci::michael_list::make_traits<
102 ci::opt::hook< ci::michael_list::member_hook<
103 offsetof( item, hMember ),
106 ,co::less< less<item> >
107 ,co::compare< cmp<item> >
108 ,ci::opt::disposer< faked_disposer >
111 typedef ci::MichaelList< RCU, item, traits > list;
112 test_rcu_int<list>();
114 void IntrusiveMichaelListHeaderTest::RCU_GPI_member_ic()
116 typedef member_int_item< RCU > item;
117 struct traits: public
118 ci::michael_list::make_traits<
119 ci::opt::hook< ci::michael_list::member_hook<
120 offsetof( item, hMember ),
123 ,co::compare< cmp<item> >
124 ,ci::opt::disposer< faked_disposer >
125 ,co::item_counter< cds::atomicity::item_counter >
128 typedef ci::MichaelList< RCU, item, traits > list;
129 test_rcu_int<list>();
131 } // namespace ordlist