Changeset 3bd39999 in rtems


Ignore:
Timestamp:
Jan 8, 2019, 8:53:26 AM (2 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
b9ffc41c
Parents:
1f285186
git-author:
Sebastian Huber <sebastian.huber@…> (01/08/19 08:53:26)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/09/19 09:35:33)
Message:

Adjust interrupt mode tests for some CPU ports

In case the robust thread dispatch is enabled by the CPU port, then the
interrupt level must not be changed through the task mode.

Update #3000.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/taskmode.c

    r1f285186 r3bd39999  
    5454#endif
    5555
    56 #if defined(RTEMS_SMP)
     56#if defined(RTEMS_SMP) || CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
    5757  if (
    5858    ( mask & RTEMS_INTERRUPT_MASK ) != 0
    5959      && _Modes_Get_interrupt_level( mode_set ) != 0
     60#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == FALSE
    6061      && rtems_configuration_is_smp_enabled()
     62#endif
    6163  ) {
    6264    return RTEMS_NOT_IMPLEMENTED;
  • cpukit/score/src/threaddispatch.c

    r1f285186 r3bd39999  
    262262  if (
    263263    !_ISR_Is_enabled( level )
    264 #if defined(RTEMS_SMP)
     264#if defined(RTEMS_SMP) && CPU_ENABLE_ROBUST_THREAD_DISPATCH == FALSE
    265265      && rtems_configuration_is_smp_enabled()
    266266#endif
  • cpukit/score/src/threadinitialize.c

    r1f285186 r3bd39999  
    6565#endif
    6666
    67 #if defined(RTEMS_SMP)
     67#if defined(RTEMS_SMP) || CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
    6868  if (
    6969    isr_level != 0
     70#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == FALSE
    7071      && rtems_configuration_is_smp_enabled()
     72#endif
    7173  ) {
    7274    return false;
  • testsuites/sptests/sp08/init.c

    r1f285186 r3bd39999  
    176176
    177177/* BEGINNING OF RTEMS_INTERRUPT_LEVEL */
    178 #if !defined(RTEMS_SMP)
     178#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == FALSE
    179179  status = rtems_task_mode(
    180180    RTEMS_INTERRUPT_LEVEL(3),
     
    198198    previous_mode
    199199  );
     200#else
     201  status = rtems_task_mode(
     202    RTEMS_INTERRUPT_LEVEL( 1 ),
     203    RTEMS_INTERRUPT_MASK,
     204    &previous_mode
     205  );
     206  fatal_directive_status( status, RTEMS_NOT_IMPLEMENTED, "rtems_task_mode" );
    200207#endif
    201208/* END OF RTEMS_INTERRUPT_LEVEL */
     
    204211
    205212  status = rtems_task_mode(
    206     RTEMS_INTERRUPT_LEVEL(3) | RTEMS_NO_ASR |
     213#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
     214    RTEMS_INTERRUPT_LEVEL(0) |
     215#else
     216    RTEMS_INTERRUPT_LEVEL(3) |
     217#endif
     218      RTEMS_NO_ASR |
    207219      RTEMS_TIMESLICE | RTEMS_NO_PREEMPT,
    208220    RTEMS_INTERRUPT_MASK | RTEMS_ASR_MASK |
     
    217229
    218230  status = rtems_task_mode(
    219     RTEMS_INTERRUPT_LEVEL(3) | RTEMS_NO_ASR |
     231#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
     232    RTEMS_INTERRUPT_LEVEL(0) |
     233#else
     234    RTEMS_INTERRUPT_LEVEL(3) |
     235#endif
     236      RTEMS_NO_ASR |
    220237      RTEMS_TIMESLICE | RTEMS_NO_PREEMPT,
    221238    RTEMS_INTERRUPT_MASK | RTEMS_ASR_MASK |
  • testsuites/sptests/sp37/init.c

    r1f285186 r3bd39999  
    7777
    7878  for ( current = 0 ; current <= mask ; ++current ) {
    79     rtems_mode initial_modes = RTEMS_INTERRUPT_LEVEL(current);
     79    rtems_mode initial_modes;
    8080    rtems_id id;
    8181    rtems_status_code sc;
    8282    rtems_event_set events;
     83
     84    initial_modes = RTEMS_INTERRUPT_LEVEL(current);
     85
     86#if CPU_ENABLE_ROBUST_THREAD_DISPATCH == TRUE
     87    if ( initial_modes != 0 ) {
     88      break;
     89    }
     90#endif
    8391
    8492    ctx.actual_level = 0xffffffff;
Note: See TracChangeset for help on using the changeset viewer.