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_buffered.h>
33 #include <cds/intrusive/lazy_list_rcu.h>
36 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
38 typedef cds::urcu::gc< cds::urcu::signal_buffered<> > RCU;
42 void IntrusiveLazyListHeaderTest::RCU_SHB_base_cmp()
44 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
45 typedef base_int_item< RCU > item;
46 typedef ci::lazy_list::make_traits<
47 ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
48 ,co::compare< cmp<item> >
49 ,ci::opt::disposer< faked_disposer >
51 typedef ci::LazyList< RCU, item, list_traits > list;
57 void IntrusiveLazyListHeaderTest::RCU_SHB_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 >
73 void IntrusiveLazyListHeaderTest::RCU_SHB_base_cmpmix()
75 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
76 typedef base_int_item< RCU > item;
77 typedef ci::LazyList< RCU
79 ,ci::lazy_list::make_traits<
80 ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
81 ,co::less< less<item> >
82 ,co::compare< cmp<item> >
83 ,ci::opt::disposer< faked_disposer >
90 void IntrusiveLazyListHeaderTest::RCU_SHB_base_ic()
92 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
93 typedef base_int_item< RCU > item;
94 typedef ci::LazyList< RCU
96 ,ci::lazy_list::make_traits<
97 ci::opt::hook< ci::lazy_list::base_hook< co::gc<RCU> > >
98 ,co::less< less<item> >
99 ,co::compare< cmp<item> >
100 ,ci::opt::disposer< faked_disposer >
101 ,co::item_counter< cds::atomicity::item_counter >
104 test_rcu_int<list>();
108 void IntrusiveLazyListHeaderTest::RCU_SHB_member_cmp()
110 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
111 typedef member_int_item< RCU > item;
112 typedef ci::LazyList< RCU
114 ,ci::lazy_list::make_traits<
115 ci::opt::hook< ci::lazy_list::member_hook<
116 offsetof( item, hMember ),
119 ,co::compare< cmp<item> >
120 ,ci::opt::disposer< faked_disposer >
123 test_rcu_int<list>();
127 void IntrusiveLazyListHeaderTest::RCU_SHB_member_less()
129 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
130 typedef member_int_item< RCU > item;
131 typedef ci::LazyList< RCU
133 ,ci::lazy_list::make_traits<
134 ci::opt::hook< ci::lazy_list::member_hook<
135 offsetof( item, hMember ),
138 ,co::less< less<item> >
139 ,ci::opt::disposer< faked_disposer >
142 test_rcu_int<list>();
146 void IntrusiveLazyListHeaderTest::RCU_SHB_member_cmpmix()
148 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
149 typedef member_int_item< RCU > item;
150 typedef ci::LazyList< RCU
152 ,ci::lazy_list::make_traits<
153 ci::opt::hook< ci::lazy_list::member_hook<
154 offsetof( item, hMember ),
157 ,co::less< less<item> >
158 ,co::compare< cmp<item> >
159 ,ci::opt::disposer< faked_disposer >
162 test_rcu_int<list>();
166 void IntrusiveLazyListHeaderTest::RCU_SHB_member_ic()
168 #ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
169 typedef member_int_item< RCU > item;
170 typedef ci::LazyList< RCU
172 ,ci::lazy_list::make_traits<
173 ci::opt::hook< ci::lazy_list::member_hook<
174 offsetof( item, hMember ),
177 ,co::compare< cmp<item> >
178 ,ci::opt::disposer< faked_disposer >
179 ,co::item_counter< cds::atomicity::item_counter >
182 test_rcu_int<list>();
186 } // namespace ordlist