Fixed use-after-free bug in VyukovMPMCCycleQueue internal buffer.
[libcds.git] / test / stress / stack / intrusive_stack_type.h
1 /*
2     This file is a part of libcds - Concurrent Data Structures library
3
4     (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
5
6     Source code repo: http://github.com/khizmax/libcds/
7     Download: http://sourceforge.net/projects/libcds/files/
8     
9     Redistribution and use in source and binary forms, with or without
10     modification, are permitted provided that the following conditions are met:
11
12     * Redistributions of source code must retain the above copyright notice, this
13       list of conditions and the following disclaimer.
14
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.
18
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.     
29 */
30
31 #ifndef CDSSTRESS_INTRUSIVE_STACK_TYPES_H
32 #define CDSSTRESS_INTRUSIVE_STACK_TYPES_H
33
34 #include <cds/intrusive/treiber_stack.h>
35 #include <cds/intrusive/fcstack.h>
36
37 #include <cds/gc/hp.h>
38 #include <cds/gc/dhp.h>
39
40 #include <mutex>
41 #include <cds/sync/spinlock.h>
42 #include <stack>
43 #include <list>
44 #include <vector>
45 #include <boost/intrusive/list.hpp>
46
47 #include <cds_test/stress_test.h>
48
49
50 namespace istack {
51
52     namespace details {
53
54         template < typename T, typename Stack, typename Lock>
55         class StdStack
56         {
57             Stack   m_Impl;
58             mutable Lock    m_Lock;
59             cds::intrusive::treiber_stack::empty_stat m_stat;
60
61             typedef std::unique_lock<Lock>  unique_lock;
62
63         public:
64             typedef T value_type;
65
66             bool push( T& v )
67             {
68                 unique_lock l( m_Lock );
69                 m_Impl.push( &v );
70                 return true;
71             }
72
73             T * pop()
74             {
75                 unique_lock l( m_Lock );
76                 if ( !m_Impl.empty() ) {
77                      T * v = m_Impl.top();
78                     m_Impl.pop();
79                     return v;
80                 }
81                 return nullptr;
82             }
83
84             bool empty() const
85             {
86                 unique_lock l( m_Lock );
87                 return m_Impl.empty();
88             }
89
90             cds::intrusive::treiber_stack::empty_stat const& statistics() const
91             {
92                 return m_stat;
93             }
94         };
95     }
96
97     template <typename T>
98     struct Types {
99
100         template <class GC>
101         using base_hook = cds::intrusive::treiber_stack::base_hook < cds::opt::gc< GC > >;
102
103     // TreiberStack
104         typedef cds::intrusive::TreiberStack< cds::gc::HP, T > Treiber_HP;
105         struct traits_Treiber_DHP: public
106             cds::intrusive::treiber_stack::make_traits <
107                 cds::intrusive::opt::hook< base_hook<cds::gc::DHP> >
108             > ::type
109         {};
110         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Treiber_DHP >Treiber_DHP;
111
112         template <class GC> struct traits_Treiber_seqcst : public
113             cds::intrusive::treiber_stack::make_traits <
114                 cds::intrusive::opt::hook< base_hook<GC> >
115                 , cds::opt::memory_model<cds::opt::v::sequential_consistent>
116             > ::type
117         {};
118         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Treiber_seqcst<cds::gc::HP>  > Treiber_HP_seqcst;
119         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Treiber_seqcst<cds::gc::DHP> > Treiber_DHP_seqcst;
120
121         template <class GC> struct traits_Treiber_stat: public
122             cds::intrusive::treiber_stack::make_traits <
123                 cds::intrusive::opt::hook< base_hook<GC> >
124                 , cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
125             > ::type
126         {};
127         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Treiber_stat<cds::gc::HP>  > Treiber_HP_stat;
128         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Treiber_stat<cds::gc::DHP> > Treiber_DHP_stat;
129
130         template <class GC> struct traits_Treiber_yield: public
131             cds::intrusive::treiber_stack::make_traits <
132                 cds::intrusive::opt::hook< base_hook<GC> >
133                 , cds::opt::back_off<cds::backoff::yield>
134                 , cds::opt::memory_model<cds::opt::v::relaxed_ordering>
135             > ::type
136         {};
137         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Treiber_yield<cds::gc::HP>  > Treiber_HP_yield;
138         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Treiber_yield<cds::gc::DHP> > Treiber_DHP_yield;
139
140         template <class GC> struct traits_Treiber_pause: public
141             cds::intrusive::treiber_stack::make_traits <
142                 cds::intrusive::opt::hook< base_hook<GC> >
143                 , cds::opt::back_off<cds::backoff::pause>
144             > ::type
145         {};
146         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Treiber_pause<cds::gc::HP>  > Treiber_HP_pause;
147         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Treiber_pause<cds::gc::DHP> > Treiber_DHP_pause;
148
149         template <class GC> struct traits_Treiber_exp: public
150             cds::intrusive::treiber_stack::make_traits <
151                 cds::intrusive::opt::hook< base_hook<GC> >
152                 ,cds::opt::back_off<
153                     cds::backoff::exponential<
154                         cds::backoff::pause,
155                         cds::backoff::yield
156                     >
157                 >
158             > ::type
159         {};
160         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Treiber_exp<cds::gc::HP>  > Treiber_HP_exp;
161         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Treiber_exp<cds::gc::DHP> > Treiber_DHP_exp;
162
163
164     // Elimination stack
165         template <class GC> struct traits_Elimination_on : public
166             cds::intrusive::treiber_stack::make_traits <
167                 cds::intrusive::opt::hook< base_hook<GC> >
168                 , cds::opt::enable_elimination<true>
169             > ::type
170         {};
171         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Elimination_on<cds::gc::HP>  > Elimination_HP;
172         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Elimination_on<cds::gc::DHP> > Elimination_DHP;
173
174         template <class GC> struct traits_Elimination_seqcst : public
175             cds::intrusive::treiber_stack::make_traits <
176                 cds::intrusive::opt::hook< base_hook<GC> >
177                 , cds::opt::enable_elimination<true>
178                 , cds::opt::memory_model< cds::opt::v::sequential_consistent >
179             > ::type
180         {};
181         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Elimination_seqcst<cds::gc::HP>  > Elimination_HP_seqcst;
182         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Elimination_seqcst<cds::gc::DHP> > Elimination_DHP_seqcst;
183
184         template <class GC> struct traits_Elimination_2ms: public
185             cds::intrusive::treiber_stack::make_traits <
186                 cds::intrusive::opt::hook< base_hook<GC> >
187                 , cds::opt::enable_elimination<true>
188                 , cds::opt::elimination_backoff< cds::backoff::delay_of<2> >
189             > ::type
190         {};
191         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Elimination_2ms<cds::gc::HP>  > Elimination_HP_2ms;
192         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Elimination_2ms<cds::gc::DHP> > Elimination_DHP_2ms;
193
194         template <class GC> struct traits_Elimination_2ms_stat: public
195             cds::intrusive::treiber_stack::make_traits <
196                 cds::intrusive::opt::hook< base_hook<GC> >
197                 , cds::opt::enable_elimination<true>
198                 , cds::opt::elimination_backoff< cds::backoff::delay_of<2> >
199                 , cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
200             > ::type
201         {};
202         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Elimination_2ms_stat<cds::gc::HP>  > Elimination_HP_2ms_stat;
203         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Elimination_2ms_stat<cds::gc::DHP> > Elimination_DHP_2ms_stat;
204
205         template <class GC> struct traits_Elimination_5ms: public
206             cds::intrusive::treiber_stack::make_traits <
207                 cds::intrusive::opt::hook< base_hook<GC> >
208                 , cds::opt::enable_elimination<true>
209                 , cds::opt::elimination_backoff< cds::backoff::delay_of<5> >
210             > ::type
211         {};
212         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Elimination_5ms<cds::gc::HP>  > Elimination_HP_5ms;
213         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Elimination_5ms<cds::gc::DHP> > Elimination_DHP_5ms;
214
215         template <class GC> struct traits_Elimination_5ms_stat: public
216             cds::intrusive::treiber_stack::make_traits <
217                 cds::intrusive::opt::hook< base_hook<GC> >
218                 , cds::opt::enable_elimination<true>
219                 , cds::opt::elimination_backoff< cds::backoff::delay_of<5> >
220                 , cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
221             > ::type
222         {};
223         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Elimination_5ms_stat<cds::gc::HP>  > Elimination_HP_5ms_stat;
224         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Elimination_5ms_stat<cds::gc::DHP> > Elimination_DHP_5ms_stat;
225
226         template <class GC> struct traits_Elimination_10ms: public
227             cds::intrusive::treiber_stack::make_traits <
228                 cds::intrusive::opt::hook< base_hook<GC> >
229                 , cds::opt::enable_elimination<true>
230                 , cds::opt::elimination_backoff< cds::backoff::delay_of<10> >
231             > ::type
232         {};
233         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Elimination_10ms<cds::gc::HP>  > Elimination_HP_10ms;
234         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Elimination_10ms<cds::gc::DHP> > Elimination_DHP_10ms;
235
236         template <class GC> struct traits_Elimination_10ms_stat: public
237             cds::intrusive::treiber_stack::make_traits <
238                 cds::intrusive::opt::hook< base_hook<GC> >
239                 , cds::opt::enable_elimination<true>
240                 , cds::opt::elimination_backoff< cds::backoff::delay_of<10> >
241                 , cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
242             > ::type
243         {};
244         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Elimination_10ms_stat<cds::gc::HP>  > Elimination_HP_10ms_stat;
245         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Elimination_10ms_stat<cds::gc::DHP> > Elimination_DHP_10ms_stat;
246
247         template <class GC> struct traits_Elimination_dyn: public
248             cds::intrusive::treiber_stack::make_traits <
249                 cds::intrusive::opt::hook< base_hook<GC> >
250                 , cds::opt::enable_elimination<true>
251                 , cds::opt::buffer< cds::opt::v::initialized_dynamic_buffer<int> >
252             > ::type
253         {};
254         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Elimination_dyn<cds::gc::HP>  > Elimination_HP_dyn;
255         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Elimination_dyn<cds::gc::DHP> > Elimination_DHP_dyn;
256
257         template <class GC> struct traits_Elimination_stat: public
258             cds::intrusive::treiber_stack::make_traits <
259                 cds::intrusive::opt::hook< base_hook<GC> >
260                 , cds::opt::enable_elimination<true>
261                 , cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
262             > ::type
263         {};
264         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Elimination_stat<cds::gc::HP>  > Elimination_HP_stat;
265         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Elimination_stat<cds::gc::DHP> > Elimination_DHP_stat;
266
267         template <class GC> struct traits_Elimination_dyn_stat: public
268             cds::intrusive::treiber_stack::make_traits <
269                 cds::intrusive::opt::hook< base_hook<GC> >
270                 , cds::opt::enable_elimination<true>
271                 , cds::opt::buffer< cds::opt::v::initialized_dynamic_buffer<int> >
272                 , cds::opt::stat<cds::intrusive::treiber_stack::stat<> >
273             > ::type
274         {};
275         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Elimination_dyn_stat<cds::gc::HP>  > Elimination_HP_dyn_stat;
276         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Elimination_dyn_stat<cds::gc::DHP> > Elimination_DHP_dyn_stat;
277
278         template <class GC> struct traits_Elimination_yield: public
279             cds::intrusive::treiber_stack::make_traits <
280                 cds::intrusive::opt::hook< base_hook<GC> >
281                 , cds::opt::enable_elimination<true>
282                 , cds::opt::back_off<cds::backoff::yield>
283                 , cds::opt::memory_model<cds::opt::v::relaxed_ordering>
284             > ::type
285         {};
286         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Elimination_yield<cds::gc::HP>  > Elimination_HP_yield;
287         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Elimination_yield<cds::gc::DHP> > Elimination_DHP_yield;
288
289         template <class GC> struct traits_Elimination_pause: public
290             cds::intrusive::treiber_stack::make_traits <
291                 cds::intrusive::opt::hook< base_hook<GC> >
292                 , cds::opt::enable_elimination<true>
293                 , cds::opt::back_off<cds::backoff::pause>
294             > ::type
295         {};
296         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Elimination_pause<cds::gc::HP>  > Elimination_HP_pause;
297         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Elimination_pause<cds::gc::DHP> > Elimination_DHP_pause;
298
299         template <class GC> struct traits_Elimination_exp: public
300             cds::intrusive::treiber_stack::make_traits <
301                 cds::intrusive::opt::hook< base_hook<GC> >
302                 , cds::opt::enable_elimination<true>
303                 ,cds::opt::back_off<
304                     cds::backoff::exponential<
305                         cds::backoff::pause,
306                         cds::backoff::yield
307                     >
308                 >
309             > ::type
310         {};
311         typedef cds::intrusive::TreiberStack< cds::gc::HP,  T, traits_Elimination_exp<cds::gc::HP>  > Elimination_HP_exp;
312         typedef cds::intrusive::TreiberStack< cds::gc::DHP, T, traits_Elimination_exp<cds::gc::DHP> > Elimination_DHP_exp;
313
314     // FCStack
315         typedef cds::intrusive::FCStack< T > FCStack_slist;
316
317         struct traits_FCStack_stat:
318             public cds::intrusive::fcstack::make_traits<
319                 cds::opt::stat< cds::intrusive::fcstack::stat<> >
320             >::type
321         {};
322         struct traits_FCStack_elimination:
323             public cds::intrusive::fcstack::make_traits<
324             cds::opt::enable_elimination< true >
325             >::type
326         {};
327         struct traits_FCStack_elimination_stat:
328             public cds::intrusive::fcstack::make_traits<
329                 cds::opt::stat< cds::intrusive::fcstack::stat<> >,
330                 cds::opt::enable_elimination< true >
331             >::type
332         {};
333
334         struct traits_FCStack_mutex_stat:
335             public cds::intrusive::fcstack::make_traits<
336                 cds::opt::stat< cds::intrusive::fcstack::stat<> >
337                 ,cds::opt::lock_type< std::mutex >
338             >::type
339         {};
340         struct traits_FCStack_mutex_elimination:
341             public cds::intrusive::fcstack::make_traits<
342                 cds::opt::enable_elimination< true >
343                 ,cds::opt::lock_type< std::mutex >
344             >::type
345         {};
346         struct traits_FCStack_mutex_elimination_stat:
347             public cds::intrusive::fcstack::make_traits<
348                 cds::opt::stat< cds::intrusive::fcstack::stat<> >
349                 ,cds::opt::enable_elimination< true >
350                 ,cds::opt::lock_type< std::mutex >
351             >::type
352         {};
353
354         typedef cds::intrusive::FCStack< T, boost::intrusive::slist< T >, traits_FCStack_stat > FCStack_slist_stat;
355         typedef cds::intrusive::FCStack< T, boost::intrusive::slist< T >, traits_FCStack_elimination > FCStack_slist_elimination;
356         typedef cds::intrusive::FCStack< T, boost::intrusive::slist< T >, traits_FCStack_elimination_stat > FCStack_slist_elimination_stat;
357         typedef cds::intrusive::FCStack< T, boost::intrusive::slist< T >, traits_FCStack_mutex_stat > FCStack_slist_mutex_stat;
358         typedef cds::intrusive::FCStack< T, boost::intrusive::slist< T >, traits_FCStack_mutex_elimination > FCStack_slist_mutex_elimination;
359         typedef cds::intrusive::FCStack< T, boost::intrusive::slist< T >, traits_FCStack_mutex_elimination_stat > FCStack_slist_mutex_elimination_stat;
360         typedef cds::intrusive::FCStack< T, boost::intrusive::list< T > > FCStack_list;
361         typedef cds::intrusive::FCStack< T, boost::intrusive::list< T >, traits_FCStack_stat > FCStack_list_stat;
362         typedef cds::intrusive::FCStack< T, boost::intrusive::list< T >, traits_FCStack_elimination > FCStack_list_elimination;
363         typedef cds::intrusive::FCStack< T, boost::intrusive::list< T >, traits_FCStack_elimination_stat > FCStack_list_elimination_stat;
364         typedef cds::intrusive::FCStack< T, boost::intrusive::list< T >, traits_FCStack_mutex_stat > FCStack_list_mutex_stat;
365         typedef cds::intrusive::FCStack< T, boost::intrusive::list< T >, traits_FCStack_mutex_elimination > FCStack_list_mutex_elimination;
366         typedef cds::intrusive::FCStack< T, boost::intrusive::list< T >, traits_FCStack_mutex_elimination_stat > FCStack_list_mutex_elimination_stat;
367
368
369         // std::stack
370         typedef details::StdStack< T, std::stack< T* >, std::mutex >  StdStack_Deque_Mutex;
371         typedef details::StdStack< T, std::stack< T* >, cds::sync::spin > StdStack_Deque_Spin;
372         typedef details::StdStack< T, std::stack< T*, std::vector<T*> >, std::mutex >  StdStack_Vector_Mutex;
373         typedef details::StdStack< T, std::stack< T*, std::vector<T*> >, cds::sync::spin > StdStack_Vector_Spin;
374         typedef details::StdStack< T, std::stack< T*, std::list<T*> >, std::mutex >  StdStack_List_Mutex;
375         typedef details::StdStack< T, std::stack< T*, std::list<T*> >, cds::sync::spin > StdStack_List_Spin;
376
377     };
378 } // namespace istack
379
380 namespace cds_test {
381
382     static inline property_stream& operator <<( property_stream& o, cds::intrusive::treiber_stack::empty_stat const& )
383     {
384         return o;
385     }
386
387     static inline property_stream& operator <<( property_stream& o, cds::intrusive::treiber_stack::stat<> const& s )
388     {
389         return o
390             << CDSSTRESS_STAT_OUT( s, m_PushCount )
391             << CDSSTRESS_STAT_OUT( s, m_PopCount )
392             << CDSSTRESS_STAT_OUT( s, m_PushRace )
393             << CDSSTRESS_STAT_OUT( s, m_PopRace )
394             << CDSSTRESS_STAT_OUT( s, m_ActivePushCollision )
395             << CDSSTRESS_STAT_OUT( s, m_PassivePopCollision )
396             << CDSSTRESS_STAT_OUT( s, m_ActivePopCollision )
397             << CDSSTRESS_STAT_OUT( s, m_PassivePushCollision )
398             << CDSSTRESS_STAT_OUT( s, m_EliminationFailed );
399     }
400
401
402     static inline property_stream& operator <<( property_stream& o, cds::intrusive::fcstack::empty_stat const& )
403     {
404         return o;
405     }
406
407     static inline property_stream& operator <<( property_stream& o, cds::intrusive::fcstack::stat<> const& s )
408     {
409         return o
410             << CDSSTRESS_STAT_OUT( s, m_nPush )
411             << CDSSTRESS_STAT_OUT( s, m_nPop )
412             << CDSSTRESS_STAT_OUT( s, m_nFailedPop )
413             << CDSSTRESS_STAT_OUT( s, m_nCollided )
414             << CDSSTRESS_STAT_OUT_( "combining_factor", s.combining_factor() )
415             << CDSSTRESS_STAT_OUT( s, m_nOperationCount )
416             << CDSSTRESS_STAT_OUT( s, m_nCombiningCount )
417             << CDSSTRESS_STAT_OUT( s, m_nCompactPublicationList )
418             << CDSSTRESS_STAT_OUT( s, m_nDeactivatePubRecord )
419             << CDSSTRESS_STAT_OUT( s, m_nActivatePubRecord )
420             << CDSSTRESS_STAT_OUT( s, m_nPubRecordCreated )
421             << CDSSTRESS_STAT_OUT( s, m_nPubRecordDeteted )
422             << CDSSTRESS_STAT_OUT( s, m_nAcquirePubRecCount )
423             << CDSSTRESS_STAT_OUT( s, m_nReleasePubRecCount );
424     }
425
426 } // namespace cds_test
427
428 #define CDSSTRESS_TreiberStack_HP( test_fixture ) \
429     CDSSTRESS_Stack_F( test_fixture, Treiber_HP        ) \
430     CDSSTRESS_Stack_F( test_fixture, Treiber_HP_seqcst ) \
431     CDSSTRESS_Stack_F( test_fixture, Treiber_HP_pause  ) \
432     CDSSTRESS_Stack_F( test_fixture, Treiber_HP_exp    ) \
433     CDSSTRESS_Stack_F( test_fixture, Treiber_HP_stat   ) \
434
435 #define CDSSTRESS_TreiberStack_DHP( test_fixture ) \
436     CDSSTRESS_Stack_F( test_fixture, Treiber_DHP       ) \
437     CDSSTRESS_Stack_F( test_fixture, Treiber_DHP_pause ) \
438     CDSSTRESS_Stack_F( test_fixture, Treiber_DHP_exp   ) \
439     CDSSTRESS_Stack_F( test_fixture, Treiber_DHP_stat  )
440
441
442 #define CDSSTRESS_EliminationStack_HP( test_fixture ) \
443     CDSSTRESS_Stack_F( test_fixture, Elimination_HP ) \
444     CDSSTRESS_Stack_F( test_fixture, Elimination_HP_2ms ) \
445     CDSSTRESS_Stack_F( test_fixture, Elimination_HP_2ms_stat ) \
446     CDSSTRESS_Stack_F( test_fixture, Elimination_HP_5ms ) \
447     CDSSTRESS_Stack_F( test_fixture, Elimination_HP_5ms_stat ) \
448     CDSSTRESS_Stack_F( test_fixture, Elimination_HP_10ms ) \
449     CDSSTRESS_Stack_F( test_fixture, Elimination_HP_10ms_stat ) \
450     CDSSTRESS_Stack_F( test_fixture, Elimination_HP_seqcst ) \
451     CDSSTRESS_Stack_F( test_fixture, Elimination_HP_pause ) \
452     CDSSTRESS_Stack_F( test_fixture, Elimination_HP_exp ) \
453     CDSSTRESS_Stack_F( test_fixture, Elimination_HP_stat ) \
454     CDSSTRESS_Stack_F( test_fixture, Elimination_HP_dyn ) \
455     CDSSTRESS_Stack_F( test_fixture, Elimination_HP_dyn_stat ) \
456
457
458 #define CDSSTRESS_EliminationStack_DHP( test_fixture ) \
459     CDSSTRESS_Stack_F( test_fixture, Elimination_DHP ) \
460     CDSSTRESS_Stack_F( test_fixture, Elimination_DHP_seqcst ) \
461     CDSSTRESS_Stack_F( test_fixture, Elimination_DHP_2ms ) \
462     CDSSTRESS_Stack_F( test_fixture, Elimination_DHP_2ms_stat ) \
463     CDSSTRESS_Stack_F( test_fixture, Elimination_DHP_5ms ) \
464     CDSSTRESS_Stack_F( test_fixture, Elimination_DHP_5ms_stat ) \
465     CDSSTRESS_Stack_F( test_fixture, Elimination_DHP_10ms ) \
466     CDSSTRESS_Stack_F( test_fixture, Elimination_DHP_10ms_stat ) \
467     CDSSTRESS_Stack_F( test_fixture, Elimination_DHP_pause ) \
468     CDSSTRESS_Stack_F( test_fixture, Elimination_DHP_exp ) \
469     CDSSTRESS_Stack_F( test_fixture, Elimination_DHP_stat ) \
470     CDSSTRESS_Stack_F( test_fixture, Elimination_DHP_dyn ) \
471     CDSSTRESS_Stack_F( test_fixture, Elimination_DHP_dyn_stat )
472
473 #define CDSSTRESS_FCStack_slist( test_fixture ) \
474     CDSSTRESS_Stack_F( test_fixture, FCStack_slist ) \
475     CDSSTRESS_Stack_F( test_fixture, FCStack_slist_stat ) \
476     CDSSTRESS_Stack_F( test_fixture, FCStack_slist_elimination ) \
477     CDSSTRESS_Stack_F( test_fixture, FCStack_slist_elimination_stat ) \
478     CDSSTRESS_Stack_F( test_fixture, FCStack_slist_mutex_stat ) \
479     CDSSTRESS_Stack_F( test_fixture, FCStack_slist_mutex_elimination ) \
480     CDSSTRESS_Stack_F( test_fixture, FCStack_slist_mutex_elimination_stat ) \
481
482 #define CDSSTRESS_FCStack_list( test_fixture ) \
483     CDSSTRESS_Stack_F( test_fixture, FCStack_list ) \
484     CDSSTRESS_Stack_F( test_fixture, FCStack_list_stat ) \
485     CDSSTRESS_Stack_F( test_fixture, FCStack_list_elimination ) \
486     CDSSTRESS_Stack_F( test_fixture, FCStack_list_elimination_stat ) \
487     CDSSTRESS_Stack_F( test_fixture, FCStack_list_mutex_stat ) \
488     CDSSTRESS_Stack_F( test_fixture, FCStack_list_mutex_elimination ) \
489     CDSSTRESS_Stack_F( test_fixture, FCStack_list_mutex_elimination_stat )
490
491 #define CDSSTRESS_StdStack( test_fixture ) \
492     CDSSTRESS_Stack_F( test_fixture, StdStack_Deque_Mutex  ) \
493     CDSSTRESS_Stack_F( test_fixture, StdStack_Deque_Spin   ) \
494     CDSSTRESS_Stack_F( test_fixture, StdStack_Vector_Mutex ) \
495     CDSSTRESS_Stack_F( test_fixture, StdStack_Vector_Spin  ) \
496     CDSSTRESS_Stack_F( test_fixture, StdStack_List_Mutex   ) \
497     CDSSTRESS_Stack_F( test_fixture, StdStack_List_Spin    )
498
499 #endif // #ifndef CDSSTRESS_INTRUSIVE_STACK_TYPES_H