Changeset 9d83f58a in rtems


Ignore:
Timestamp:
Aug 12, 2013, 8:32:32 AM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
6ba15488
Parents:
0405082
git-author:
Sebastian Huber <sebastian.huber@…> (08/12/13 08:32:32)
git-committer:
Sebastian Huber <sebastian.huber@…> (08/20/13 08:14:04)
Message:

smp: Replace Scheduler_simple_smp_Control

Replace Scheduler_simple_smp_Control with Scheduler_SMP_Control. Rename
_Scheduler_simple_smp_Instance() to _Scheduler_SMP_Instance().

Location:
cpukit
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/include/confdefs.h

    r0405082 r9d83f58a  
    688688   */
    689689  #define CONFIGURE_MEMORY_FOR_SCHEDULER ( \
    690     _Configure_From_workspace( sizeof( Scheduler_simple_smp_Control ) ) \
     690    _Configure_From_workspace( sizeof( Scheduler_SMP_Control ) ) \
    691691  )
    692692  #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER (0)
  • cpukit/score/Makefile.am

    r0405082 r9d83f58a  
    5656include_rtems_score_HEADERS += include/rtems/score/schedulersimple.h
    5757include_rtems_score_HEADERS += include/rtems/score/schedulersimpleimpl.h
     58include_rtems_score_HEADERS += include/rtems/score/schedulersmp.h
     59include_rtems_score_HEADERS += include/rtems/score/schedulersmpimpl.h
    5860include_rtems_score_HEADERS += include/rtems/score/smp.h
    5961include_rtems_score_HEADERS += include/rtems/score/smplock.h
  • cpukit/score/include/rtems/score/schedulersimplesmp.h

    r0405082 r9d83f58a  
    2626#include <rtems/score/scheduler.h>
    2727#include <rtems/score/schedulerpriority.h>
     28#include <rtems/score/schedulersmp.h>
    2829
    2930/**
     
    4849 * @{
    4950 */
    50 
    51 typedef struct {
    52   Chain_Control ready;
    53   Chain_Control scheduled;
    54 } Scheduler_simple_smp_Control;
    5551
    5652/**
  • cpukit/score/preinstall.am

    r0405082 r9d83f58a  
    204204PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulersimpleimpl.h
    205205
     206$(PROJECT_INCLUDE)/rtems/score/schedulersmp.h: include/rtems/score/schedulersmp.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
     207        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulersmp.h
     208PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulersmp.h
     209
     210$(PROJECT_INCLUDE)/rtems/score/schedulersmpimpl.h: include/rtems/score/schedulersmpimpl.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
     211        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulersmpimpl.h
     212PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulersmpimpl.h
     213
    206214$(PROJECT_INCLUDE)/rtems/score/smp.h: include/rtems/score/smp.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
    207215        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/smp.h
  • cpukit/score/src/schedulersimplesmp.c

    r0405082 r9d83f58a  
    2121#include <rtems/score/schedulersimplesmp.h>
    2222#include <rtems/score/schedulersimpleimpl.h>
     23#include <rtems/score/schedulersmpimpl.h>
    2324#include <rtems/score/wkspace.h>
    24 
    25 static Scheduler_simple_smp_Control *_Scheduler_simple_smp_Instance( void )
    26 {
    27   return _Scheduler.information;
    28 }
    2925
    3026void _Scheduler_simple_smp_Initialize( void )
    3127{
    32   Scheduler_simple_smp_Control *self =
     28  Scheduler_SMP_Control *self =
    3329    _Workspace_Allocate_or_fatal_error( sizeof( *self ) );
    3430
    35   _Chain_Initialize_empty( &self->ready );
     31  _Chain_Initialize_empty( &self->ready[ 0 ] );
    3632  _Chain_Initialize_empty( &self->scheduled );
    3733
     
    113109)
    114110{
    115   Scheduler_simple_smp_Control *self = _Scheduler_simple_smp_Instance();
     111  Scheduler_SMP_Control *self = _Scheduler_SMP_Instance();
    116112
    117113  /*
     
    128124
    129125    _Scheduler_simple_smp_Move_from_scheduled_to_ready(
    130       &self->ready,
     126      &self->ready[ 0 ],
    131127      lowest_scheduled
    132128    );
    133129  } else {
    134     _Scheduler_simple_smp_Insert( &self->ready, thread, order );
     130    _Scheduler_simple_smp_Insert( &self->ready[ 0 ], thread, order );
    135131  }
    136132}
     
    154150void _Scheduler_simple_smp_Extract( Thread_Control *thread )
    155151{
    156   Scheduler_simple_smp_Control *self = _Scheduler_simple_smp_Instance();
     152  Scheduler_SMP_Control *self = _Scheduler_SMP_Instance();
    157153
    158154  _Chain_Extract_unprotected( &thread->Object.Node );
     
    160156  if ( thread->is_scheduled ) {
    161157    Thread_Control *highest_ready =
    162       (Thread_Control *) _Chain_First( &self->ready );
     158      (Thread_Control *) _Chain_First( &self->ready[ 0 ] );
    163159
    164160    _Scheduler_simple_smp_Allocate_processor( highest_ready, thread );
     
    193189)
    194190{
    195   Scheduler_simple_smp_Control *self = _Scheduler_simple_smp_Instance();
     191  Scheduler_SMP_Control *self = _Scheduler_SMP_Instance();
    196192
    197193  thread->is_scheduled = true;
Note: See TracChangeset for help on using the changeset viewer.