Changeset 8009063 in rtems


Ignore:
Timestamp:
07/05/22 07:04:26 (20 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
e7d01e78
Parents:
6e74ceb
git-author:
Sebastian Huber <sebastian.huber@…> (07/05/22 07:04:26)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/07/22 06:48:26)
Message:

score: Use RTEMS_SMP in _Thread_Create_idle()

Conditional expressions with inline functions are not optimized away if
optimization is disabled. Avoid such expressions to prevent dead
branches.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/threadcreateidle.c

    r6e74ceb r8009063  
    113113void _Thread_Create_idle( void )
    114114{
     115#if defined(RTEMS_SMP)
    115116  uint32_t cpu_max;
    116117  uint32_t cpu_index;
    117118
    118   _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
    119119  cpu_max = _SMP_Get_processor_maximum();
    120120
     
    126126    }
    127127  }
     128#else
     129  _Thread_Create_idle_for_CPU( _Per_CPU_Get() );
     130#endif
    128131
    129132  _CPU_Use_thread_local_storage(
    130133    &_Per_CPU_Get_executing( _Per_CPU_Get() )->Registers
    131134  );
     135  _System_state_Set( SYSTEM_STATE_BEFORE_MULTITASKING );
    132136}
Note: See TracChangeset for help on using the changeset viewer.