]> pd.if.org Git - liblfds/blob - libtest_tests_hash_addonly_alignment.c
9a2ddd5f7469c4ed12ae8d391adca084dbc63380
[liblfds] / libtest_tests_hash_addonly_alignment.c
1 /***** includes *****/
2 #include "libtest_tests_internal.h"
3
4
5
6
7
8 /****************************************************************************/
9 #pragma warning( disable : 4100 4127 ) // TRD : disables MSVC warning for condition expressions being const
10
11 void libtest_tests_hash_a_alignment( struct lfds710_list_asu_state *list_of_logical_processors, struct libshared_memory_state *ms, enum lfds710_misc_validity *dvs )
12 {
13   /* TRD : these are compile time checks
14            but we do them here because this is a test programme
15            and it should indicate issues to users when it is *run*,
16            not when it is compiled, because a compile error normally
17            indicates a problem with the code itself and so is misleading
18   */
19
20   LFDS710_PAL_ASSERT( list_of_logical_processors != NULL );
21   LFDS710_PAL_ASSERT( ms != NULL );
22   LFDS710_PAL_ASSERT( dvs != NULL );
23
24   *dvs = LFDS710_MISC_VALIDITY_VALID;
25
26   // TRD : struct lfds710_hash_a_element
27   if( LIBTEST_MISC_OFFSETOF(struct lfds710_hash_a_element,value) % LFDS710_PAL_ALIGN_SINGLE_POINTER != 0 )
28     *dvs = LFDS710_MISC_VALIDITY_INVALID_TEST_DATA;
29
30   return;
31 }
32
33 #pragma warning( default : 4100 4127 )
34