]> pd.if.org Git - liblfds/blob - liblfds/liblfds7.0.0/test/src/test_lfds700_queue.c
Initial import (all versions, including the new 7.1.0)
[liblfds] / liblfds / liblfds7.0.0 / test / src / test_lfds700_queue.c
1 /***** includes *****/
2 #include "internal.h"
3
4
5
6
7
8 /****************************************************************************/
9 #pragma warning( disable : 4127 ) // TRD : disables MSVC warning for condition expressions being const
10
11 void test_lfds700_queue( struct lfds700_list_asu_state *list_of_logical_processors, lfds700_pal_uint_t memory_in_megabytes )
12 {
13   assert( list_of_logical_processors != NULL );
14   // TRD : memory_in_megabytes can be any value in its range
15
16   if( LFDS700_MISC_ATOMIC_SUPPORT_DWCAS )
17   {
18     printf( "\n"
19             "Queue Tests\n"
20             "===========\n" );
21
22     test_lfds700_queue_alignment();
23     test_lfds700_queue_enqueuing( list_of_logical_processors, memory_in_megabytes );
24     test_lfds700_queue_dequeuing( list_of_logical_processors, memory_in_megabytes );
25     test_lfds700_queue_enqueuing_and_dequeuing( list_of_logical_processors );
26     test_lfds700_queue_rapid_enqueuing_and_dequeuing( list_of_logical_processors, memory_in_megabytes );
27     test_lfds700_queue_enqueuing_and_dequeuing_with_free( list_of_logical_processors, memory_in_megabytes );
28     test_lfds700_queue_enqueuing_with_malloc_and_dequeuing_with_free( list_of_logical_processors );
29   }
30
31   return;
32 }
33
34 #pragma warning( default : 4127 )
35