2 This file is a part of libcds - Concurrent Data Structures library
4 (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
6 Source code repo: http://github.com/khizmax/libcds/
7 Download: http://sourceforge.net/projects/libcds/files/
9 Redistribution and use in source and binary forms, with or without
10 modification, are permitted provided that the following conditions are met:
12 * Redistributions of source code must retain the above copyright notice, this
13 list of conditions and the following disclaimer.
15 * Redistributions in binary form must reproduce the above copyright notice,
16 this list of conditions and the following disclaimer in the documentation
17 and/or other materials provided with the distribution.
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #include "list/hdr_intrusive_lazy.h"
32 #include <cds/urcu/signal_threaded.h>
33 #include <cds/intrusive/lazy_list_rcu.h>
36 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
38 typedef cds::urcu::gc< cds::urcu::signal_threaded<> > RCU;
42 void IntrusiveLazyListHeaderTest::RCU_SHT_base_cmp()
44 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
45 typedef base_int_item< RCU > item;
46 typedef ci::LazyList< RCU
48 ,ci::lazy_list::make_traits<
49 ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
50 ,co::compare< cmp<item> >
51 ,ci::opt::disposer< faked_disposer >
57 void IntrusiveLazyListHeaderTest::RCU_SHT_base_less()
59 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
60 typedef base_int_item< RCU > item;
61 typedef ci::LazyList< RCU
63 ,ci::lazy_list::make_traits<
64 ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
65 ,co::less< less<item> >
66 ,ci::opt::disposer< faked_disposer >
72 void IntrusiveLazyListHeaderTest::RCU_SHT_base_cmpmix()
74 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
75 typedef base_int_item< RCU > item;
76 typedef ci::LazyList< RCU
78 ,ci::lazy_list::make_traits<
79 ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
80 ,co::less< less<item> >
81 ,co::compare< cmp<item> >
82 ,ci::opt::disposer< faked_disposer >
88 void IntrusiveLazyListHeaderTest::RCU_SHT_base_ic()
90 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
91 typedef base_int_item< RCU > item;
92 typedef ci::LazyList< RCU
94 ,ci::lazy_list::make_traits<
95 ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
96 ,co::less< less<item> >
97 ,co::compare< cmp<item> >
98 ,ci::opt::disposer< faked_disposer >
99 ,co::item_counter< cds::atomicity::item_counter >
102 test_rcu_int<list>();
105 void IntrusiveLazyListHeaderTest::RCU_SHT_member_cmp()
107 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
108 typedef member_int_item< RCU > item;
109 typedef ci::LazyList< RCU
111 ,ci::lazy_list::make_traits<
112 ci::opt::hook< ci::lazy_list::member_hook<
113 offsetof( item, hMember ),
116 ,co::compare< cmp<item> >
117 ,ci::opt::disposer< faked_disposer >
120 test_rcu_int<list>();
123 void IntrusiveLazyListHeaderTest::RCU_SHT_member_less()
125 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
126 typedef member_int_item< RCU > item;
127 typedef ci::LazyList< RCU
129 ,ci::lazy_list::make_traits<
130 ci::opt::hook< ci::lazy_list::member_hook<
131 offsetof( item, hMember ),
134 ,co::less< less<item> >
135 ,ci::opt::disposer< faked_disposer >
138 test_rcu_int<list>();
141 void IntrusiveLazyListHeaderTest::RCU_SHT_member_cmpmix()
143 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
144 typedef member_int_item< RCU > item;
145 typedef ci::LazyList< RCU
147 ,ci::lazy_list::make_traits<
148 ci::opt::hook< ci::lazy_list::member_hook<
149 offsetof( item, hMember ),
152 ,co::less< less<item> >
153 ,co::compare< cmp<item> >
154 ,ci::opt::disposer< faked_disposer >
157 test_rcu_int<list>();
160 void IntrusiveLazyListHeaderTest::RCU_SHT_member_ic()
162 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
163 typedef member_int_item< RCU > item;
164 typedef ci::LazyList< RCU
166 ,ci::lazy_list::make_traits<
167 ci::opt::hook< ci::lazy_list::member_hook<
168 offsetof( item, hMember ),
171 ,co::compare< cmp<item> >
172 ,ci::opt::disposer< faked_disposer >
173 ,co::item_counter< cds::atomicity::item_counter >
176 test_rcu_int<list>();
179 } // namespace ordlist