]> pd.if.org Git - liblfds/blob - liblfds/liblfds7.0.0/test/src/test_lfds700_porting_abstraction_layer_atomic.c
Initial import (all versions, including the new 7.1.0)
[liblfds] / liblfds / liblfds7.0.0 / test / src / test_lfds700_porting_abstraction_layer_atomic.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_pal_atomic( 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   printf( "\n"
17           "Abstraction Atomic Tests\n"
18           "========================\n" );
19
20   if( LFDS700_MISC_ATOMIC_SUPPORT_CAS )
21     test_lfds700_pal_atomic_cas( list_of_logical_processors );
22
23   if( LFDS700_MISC_ATOMIC_SUPPORT_DWCAS )
24     test_lfds700_pal_atomic_dwcas( list_of_logical_processors );
25
26   if( LFDS700_MISC_ATOMIC_SUPPORT_EXCHANGE )
27     test_lfds700_pal_atomic_exchange( list_of_logical_processors, memory_in_megabytes );
28
29   return;
30 }
31
32 #pragma warning( default : 4127 )
33