Changeset 189da5f4 in rtems


Ignore:
Timestamp:
Dec 10, 2019, 7:26:33 AM (7 weeks ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
a6b2080
Parents:
5e589d96
git-author:
Sebastian Huber <sebastian.huber@…> (12/10/19 07:26:33)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/10/19 07:29:53)
Message:

score: Optimize _Per_CPU_Get_index()

Optimize _Per_CPU_Get_index() in uniprocessor configurations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/score/percpu.h

    r5e589d96 r189da5f4  
    655655static inline uint32_t _Per_CPU_Get_index( const Per_CPU_Control *cpu )
    656656{
     657#if defined(RTEMS_SMP)
    657658  const Per_CPU_Control_envelope *per_cpu_envelope =
    658659    ( const Per_CPU_Control_envelope * ) cpu;
    659660
    660661  return ( uint32_t ) ( per_cpu_envelope - &_Per_CPU_Information[ 0 ] );
     662#else
     663  (void) cpu;
     664  return 0;
     665#endif
    661666}
    662667
Note: See TracChangeset for help on using the changeset viewer.