Changeset 41310c02 in rtems for testsuites


Ignore:
Timestamp:
Jan 18, 2019, 12:16:29 PM (11 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
926ed2b0
Parents:
b5bdecf
git-author:
Sebastian Huber <sebastian.huber@…> (01/18/19 12:16:29)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/18/19 12:33:18)
Message:

score: Improve debug support for ISR locks

Ensure that interrupts are disabled while acquiring an ISR lock.

File:
1 edited

Legend:

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

    rb5bdecf r41310c02  
    179179  size_t i;
    180180  const uint8_t *initialized_bytes;
     181  ISR_Level interrupt_level;
    181182
    182183  memset( &container, 0xff, sizeof( container ) );
     
    204205  rtems_test_assert( normal_interrupt_level == _ISR_Get_level() );
    205206
     207#if defined(RTEMS_DEBUG)
     208  _ISR_lock_ISR_disable( &lock_context );
     209#endif
     210  interrupt_level = _ISR_Get_level();
    206211  _ISR_lock_Acquire( &container.lock, &lock_context );
     212  rtems_test_assert( interrupt_level == _ISR_Get_level() );
     213#if !defined(RTEMS_DEBUG)
    207214  rtems_test_assert( normal_interrupt_level == _ISR_Get_level() );
     215#endif
    208216  _ISR_lock_Release( &container.lock, &lock_context );
     217  rtems_test_assert( interrupt_level == _ISR_Get_level() );
     218#if defined(RTEMS_DEBUG)
     219  _ISR_lock_ISR_enable( &lock_context );
     220#endif
    209221
    210222  rtems_test_assert( normal_interrupt_level == _ISR_Get_level() );
Note: See TracChangeset for help on using the changeset viewer.