Move libcds 1.6.0 from SVN
[libcds.git] / tests / test-hdr / ordered_list / hdr_intrusive_michael_list_rcu_shb.cpp
1 //$$CDS-header$$
2
3 #include "ordered_list/hdr_intrusive_michael.h"
4 #include <cds/urcu/signal_buffered.h>
5 #include <cds/intrusive/michael_list_rcu.h>
6
7 namespace ordlist {
8 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
9     namespace {
10         typedef cds::urcu::gc< cds::urcu::signal_buffered<> >    RCU;
11     }
12 #endif
13
14     void IntrusiveMichaelListHeaderTest::RCU_SHB_base_cmp()
15     {
16 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
17         typedef base_int_item< RCU > item;
18         typedef ci::MichaelList< RCU
19             ,item
20             ,ci::michael_list::make_traits<
21                 ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
22                 ,co::compare< cmp<item> >
23                 ,ci::opt::disposer< faked_disposer >
24             >::type
25         >    list;
26         test_rcu_int<list>();
27 #endif
28     }
29     void IntrusiveMichaelListHeaderTest::RCU_SHB_base_less()
30     {
31 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
32         typedef base_int_item< RCU > item;
33         typedef ci::MichaelList< RCU
34             ,item
35             ,ci::michael_list::make_traits<
36                 ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
37                 ,co::less< less<item> >
38                 ,ci::opt::disposer< faked_disposer >
39             >::type
40         >    list;
41         test_rcu_int<list>();
42 #endif
43     }
44     void IntrusiveMichaelListHeaderTest::RCU_SHB_base_cmpmix()
45     {
46 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
47         typedef base_int_item< RCU > item;
48         typedef ci::MichaelList< RCU
49             ,item
50             ,ci::michael_list::make_traits<
51                 ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
52                 ,co::less< less<item> >
53                 ,co::compare< cmp<item> >
54                 ,ci::opt::disposer< faked_disposer >
55             >::type
56         >    list;
57         test_rcu_int<list>();
58 #endif
59     }
60     void IntrusiveMichaelListHeaderTest::RCU_SHB_base_ic()
61     {
62 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
63         typedef base_int_item< RCU > item;
64         typedef ci::MichaelList< RCU
65             ,item
66             ,ci::michael_list::make_traits<
67                 ci::opt::hook< ci::michael_list::base_hook< co::gc<RCU> > >
68                 ,co::less< less<item> >
69                 ,co::compare< cmp<item> >
70                 ,ci::opt::disposer< faked_disposer >
71                 ,co::item_counter< cds::atomicity::item_counter >
72             >::type
73         >    list;
74         test_rcu_int<list>();
75 #endif
76     }
77     void IntrusiveMichaelListHeaderTest::RCU_SHB_member_cmp()
78     {
79 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
80         typedef member_int_item< RCU > item;
81         typedef ci::MichaelList< RCU
82             ,item
83             ,ci::michael_list::make_traits<
84                 ci::opt::hook< ci::michael_list::member_hook<
85                     offsetof( item, hMember ),
86                     co::gc<RCU>
87                 > >
88                 ,co::compare< cmp<item> >
89                 ,ci::opt::disposer< faked_disposer >
90             >::type
91         >    list;
92         test_rcu_int<list>();
93 #endif
94     }
95     void IntrusiveMichaelListHeaderTest::RCU_SHB_member_less()
96     {
97 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
98         typedef member_int_item< RCU > item;
99         typedef ci::MichaelList< RCU
100             ,item
101             ,ci::michael_list::make_traits<
102                 ci::opt::hook< ci::michael_list::member_hook<
103                     offsetof( item, hMember ),
104                     co::gc<RCU>
105                 > >
106                 ,co::less< less<item> >
107                 ,ci::opt::disposer< faked_disposer >
108             >::type
109         >    list;
110         test_rcu_int<list>();
111 #endif
112     }
113     void IntrusiveMichaelListHeaderTest::RCU_SHB_member_cmpmix()
114     {
115 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
116         typedef member_int_item< RCU > item;
117         typedef ci::MichaelList< RCU
118             ,item
119             ,ci::michael_list::make_traits<
120                 ci::opt::hook< ci::michael_list::member_hook<
121                     offsetof( item, hMember ),
122                     co::gc<RCU>
123                 > >
124                 ,co::less< less<item> >
125                 ,co::compare< cmp<item> >
126                 ,ci::opt::disposer< faked_disposer >
127             >::type
128         >    list;
129         test_rcu_int<list>();
130 #endif
131     }
132     void IntrusiveMichaelListHeaderTest::RCU_SHB_member_ic()
133     {
134 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
135         typedef member_int_item< RCU > item;
136         typedef ci::MichaelList< RCU
137             ,item
138             ,ci::michael_list::make_traits<
139                 ci::opt::hook< ci::michael_list::member_hook<
140                     offsetof( item, hMember ),
141                     co::gc<RCU>
142                 > >
143                 ,co::compare< cmp<item> >
144                 ,ci::opt::disposer< faked_disposer >
145                 ,co::item_counter< cds::atomicity::item_counter >
146             >::type
147         >    list;
148         test_rcu_int<list>();
149 #endif
150     }
151
152 }