Changeset 2369b10 in rtems


Ignore:
Timestamp:
05/14/14 14:04:10 (10 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, 5, master
Children:
f39f667a
Parents:
0f41cc3
git-author:
Sebastian Huber <sebastian.huber@…> (05/14/14 14:04:10)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/14/14 15:01:22)
Message:

score: Add and use _Scheduler_Get_context()

Location:
cpukit/score
Files:
7 edited

Legend:

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

    r0f41cc3 r2369b10  
    3535  _Scheduler_EDF_Get_context( const Scheduler_Control *scheduler )
    3636{
    37   return (Scheduler_EDF_Context *) scheduler->context;
     37  return (Scheduler_EDF_Context *) _Scheduler_Get_context( scheduler );
    3838}
    3939
  • cpukit/score/include/rtems/score/schedulerimpl.h

    r0f41cc3 r2369b10  
    579579}
    580580
     581RTEMS_INLINE_ROUTINE Scheduler_Context *_Scheduler_Get_context(
     582  const Scheduler_Control *scheduler
     583)
     584{
     585  return scheduler->context;
     586}
     587
    581588RTEMS_INLINE_ROUTINE uint32_t _Scheduler_Get_processor_count(
    582589  const Scheduler_Control *scheduler
     
    584591{
    585592#if defined(RTEMS_SMP)
    586   return scheduler->context->processor_count;
     593  return _Scheduler_Get_context( scheduler )->processor_count;
    587594#else
    588595  (void) scheduler;
  • cpukit/score/include/rtems/score/schedulerpriorityimpl.h

    r0f41cc3 r2369b10  
    3939  _Scheduler_priority_Get_context( const Scheduler_Control *scheduler )
    4040{
    41   return (Scheduler_priority_Context *) scheduler->context;
     41  return (Scheduler_priority_Context *) _Scheduler_Get_context( scheduler );
    4242}
    4343
  • cpukit/score/include/rtems/score/schedulersimpleimpl.h

    r0f41cc3 r2369b10  
    3636  _Scheduler_simple_Get_context( const Scheduler_Control *scheduler )
    3737{
    38   return (Scheduler_simple_Context *) scheduler->context;
     38  return (Scheduler_simple_Context *) _Scheduler_Get_context( scheduler );
    3939}
    4040
  • cpukit/score/src/schedulerprioritysmp.c

    r0f41cc3 r2369b10  
    3333_Scheduler_priority_SMP_Get_context( const Scheduler_Control *scheduler )
    3434{
    35   return (Scheduler_priority_SMP_Context *) scheduler->context;
     35  return (Scheduler_priority_SMP_Context *) _Scheduler_Get_context( scheduler );
    3636}
    3737
  • cpukit/score/src/schedulersimplesmp.c

    r0f41cc3 r2369b10  
    2626_Scheduler_simple_SMP_Get_context( const Scheduler_Control *scheduler )
    2727{
    28   return (Scheduler_simple_SMP_Context *) scheduler->context;
     28  return (Scheduler_simple_SMP_Context *) _Scheduler_Get_context( scheduler );
    2929}
    3030
  • cpukit/score/src/smp.c

    r0f41cc3 r2369b10  
    5959
    6060    if ( started ) {
    61       Scheduler_Context *scheduler_context = assignment->scheduler->context;
     61      Scheduler_Context *context =
     62        _Scheduler_Get_context( assignment->scheduler );
    6263
    63       ++scheduler_context->processor_count;
    64       cpu->scheduler_context = scheduler_context;
     64      ++context->processor_count;
     65      cpu->scheduler_context = context;
    6566    }
    6667  }
Note: See TracChangeset for help on using the changeset viewer.