index on dev: 5db878e remove michael_list_hrc.h
[libcds.git] / tests / test-hdr / ordered_list / hdr_intrusive_michael_list_rcu_gpt.cpp
1 //$$CDS-header$$
2
3 #include "ordered_list/hdr_intrusive_michael.h"
4 #include <cds/urcu/general_threaded.h>
5 #include <cds/intrusive/michael_list_rcu.h>
6
7 namespace ordlist {
8     namespace {
9         typedef cds::urcu::gc< cds::urcu::general_threaded<> >    RCU;
10     }
11
12     void IntrusiveMichaelListHeaderTest::RCU_GPT_base_cmp()
13     {
14         typedef base_int_item< RCU > item;
15         typedef ci::MichaelList< RCU
16             ,item
17             ,ci::michael_list::make_traits<
18                 ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
19                 ,co::compare< cmp<item> >
20                 ,ci::opt::disposer< faked_disposer >
21             >::type
22         >    list;
23         test_rcu_int<list>();
24     }
25     void IntrusiveMichaelListHeaderTest::RCU_GPT_base_less()
26     {
27         typedef base_int_item< RCU > item;
28         typedef ci::MichaelList< RCU
29             ,item
30             ,ci::michael_list::make_traits<
31                 ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
32                 ,co::less< less<item> >
33                 ,ci::opt::disposer< faked_disposer >
34             >::type
35         >    list;
36         test_rcu_int<list>();
37     }
38     void IntrusiveMichaelListHeaderTest::RCU_GPT_base_cmpmix()
39     {
40         typedef base_int_item< RCU > item;
41         typedef ci::MichaelList< RCU
42             ,item
43             ,ci::michael_list::make_traits<
44                 ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
45                 ,co::less< less<item> >
46                 ,co::compare< cmp<item> >
47                 ,ci::opt::disposer< faked_disposer >
48             >::type
49         >    list;
50         test_rcu_int<list>();
51     }
52     void IntrusiveMichaelListHeaderTest::RCU_GPT_base_ic()
53     {
54         typedef base_int_item< RCU > item;
55         typedef ci::MichaelList< RCU
56             ,item
57             ,ci::michael_list::make_traits<
58                 ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
59                 ,co::less< less<item> >
60                 ,co::compare< cmp<item> >
61                 ,ci::opt::disposer< faked_disposer >
62                 ,co::item_counter< cds::atomicity::item_counter >
63             >::type
64         >    list;
65         test_rcu_int<list>();
66     }
67     void IntrusiveMichaelListHeaderTest::RCU_GPT_member_cmp()
68     {
69         typedef member_int_item< RCU > item;
70         typedef ci::MichaelList< RCU
71             ,item
72             ,ci::michael_list::make_traits<
73                 ci::opt::hook< ci::michael_list::member_hook<
74                     offsetof( item, hMember ),
75                     co::gc<RCU>
76                 > >
77                 ,co::compare< cmp<item> >
78                 ,ci::opt::disposer< faked_disposer >
79             >::type
80         >    list;
81         test_rcu_int<list>();
82     }
83     void IntrusiveMichaelListHeaderTest::RCU_GPT_member_less()
84     {
85         typedef member_int_item< RCU > item;
86         typedef ci::MichaelList< RCU
87             ,item
88             ,ci::michael_list::make_traits<
89                 ci::opt::hook< ci::michael_list::member_hook<
90                     offsetof( item, hMember ),
91                     co::gc<RCU>
92                 > >
93                 ,co::less< less<item> >
94                 ,ci::opt::disposer< faked_disposer >
95             >::type
96         >    list;
97         test_rcu_int<list>();
98     }
99     void IntrusiveMichaelListHeaderTest::RCU_GPT_member_cmpmix()
100     {
101         typedef member_int_item< RCU > item;
102         typedef ci::MichaelList< RCU
103             ,item
104             ,ci::michael_list::make_traits<
105                 ci::opt::hook< ci::michael_list::member_hook<
106                     offsetof( item, hMember ),
107                     co::gc<RCU>
108                 > >
109                 ,co::less< less<item> >
110                 ,co::compare< cmp<item> >
111                 ,ci::opt::disposer< faked_disposer >
112             >::type
113         >    list;
114         test_rcu_int<list>();
115     }
116     void IntrusiveMichaelListHeaderTest::RCU_GPT_member_ic()
117     {
118         typedef member_int_item< RCU > item;
119         typedef ci::MichaelList< RCU
120             ,item
121             ,ci::michael_list::make_traits<
122                 ci::opt::hook< ci::michael_list::member_hook<
123                     offsetof( item, hMember ),
124                     co::gc<RCU>
125                 > >
126                 ,co::compare< cmp<item> >
127                 ,ci::opt::disposer< faked_disposer >
128                 ,co::item_counter< cds::atomicity::item_counter >
129             >::type
130         >    list;
131         test_rcu_int<list>();
132     }
133
134 }