Changeset 2d5424d2 in rtems


Ignore:
Timestamp:
Apr 9, 2014, 7:40:43 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
6cf45cb
Parents:
c3cd7e7
git-author:
Sebastian Huber <sebastian.huber@…> (04/09/14 07:40:43)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/09/14 13:30:24)
Message:

sptests/sp37: Account for internal struct align

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/sptests/sp37/init.c

    rc3cd7e7 r2d5424d2  
    160160}
    161161
     162#if defined(RTEMS_SMP) && defined(RTEMS_PROFILING)
     163static const size_t lock_size =
     164  offsetof( ISR_lock_Control, lock.ticket_lock.Stats.name )
     165    + sizeof( ((ISR_lock_Control *) 0)->lock.ticket_lock.Stats.name );
     166#else
     167static const size_t lock_size = sizeof( ISR_lock_Control );
     168#endif
     169
    162170static void test_isr_locks( void )
    163171{
     
    168176
    169177  _ISR_lock_Initialize( &lock, "test" );
    170   rtems_test_assert( memcmp( &lock, &initialized, sizeof( lock ) ) == 0 );
     178  rtems_test_assert( memcmp( &lock, &initialized, lock_size ) == 0 );
    171179
    172180  _ISR_lock_ISR_disable_and_acquire( &lock, &lock_context );
     
    205213
    206214  rtems_interrupt_lock_initialize( &lock, "test" );
    207   rtems_test_assert( memcmp( &lock, &initialized, sizeof( lock ) ) == 0 );
     215  rtems_test_assert( memcmp( &lock, &initialized, lock_size ) == 0 );
    208216
    209217  rtems_interrupt_lock_acquire( &lock, &lock_context );
Note: See TracChangeset for help on using the changeset viewer.