Changeset 38cb59e in rtems


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

Separate task mode checks

Update #3000.

Location:
cpukit
Files:
2 edited

Legend:

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

    rfeddcde r38cb59e  
    4444    return RTEMS_INVALID_ADDRESS;
    4545
    46 #if defined( RTEMS_SMP )
    47   /*
    48    * When in SMP, you cannot disable preemption for a thread or
    49    * alter its interrupt level. It must be fully preemptible with
    50    * all interrupts enabled.
    51    */
    52   if ( rtems_configuration_is_smp_enabled() ) {
    53     if ( mask & RTEMS_PREEMPT_MASK ) {
    54       if ( !_Modes_Is_preempt( mode_set ) ) {
    55         return RTEMS_NOT_IMPLEMENTED;
    56       }
    57     }
     46#if defined(RTEMS_SMP)
     47  if (
     48    ( mask & RTEMS_PREEMPT_MASK ) != 0
     49      && !_Modes_Is_preempt( mode_set )
     50      && rtems_configuration_is_smp_enabled()
     51  ) {
     52    return RTEMS_NOT_IMPLEMENTED;
     53  }
     54#endif
    5855
    59     if ( mask & RTEMS_INTERRUPT_MASK ) {
    60       return RTEMS_NOT_IMPLEMENTED;
    61     }
     56#if defined(RTEMS_SMP)
     57  if (
     58    ( mask & RTEMS_INTERRUPT_MASK ) != 0
     59      && rtems_configuration_is_smp_enabled()
     60  ) {
     61    return RTEMS_NOT_IMPLEMENTED;
    6262  }
    6363#endif
  • cpukit/score/src/threadinitialize.c

    rfeddcde r38cb59e  
    5959  Per_CPU_Control         *cpu = _Per_CPU_Get_by_index( 0 );
    6060
    61 #if defined( RTEMS_SMP )
    62   if ( rtems_configuration_is_smp_enabled() ) {
    63     if ( !is_preemptible ) {
    64       return false;
    65     }
    66 
    67     if ( isr_level != 0 ) {
    68       return false;
    69     }
     61#if defined(RTEMS_SMP)
     62  if ( !is_preemptible && rtems_configuration_is_smp_enabled() ) {
     63    return false;
     64  }
     65#endif
     66
     67#if defined(RTEMS_SMP)
     68  if (
     69    isr_level != 0
     70      && rtems_configuration_is_smp_enabled()
     71  ) {
     72    return false;
    7073  }
    7174#endif
Note: See TracChangeset for help on using the changeset viewer.