Changeset a344308 in rtems


Ignore:
Timestamp:
Jun 6, 2013, 1:32:22 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
8f42092
Parents:
6eba7c85
git-author:
Sebastian Huber <sebastian.huber@…> (06/06/13 13:32:22)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/14/13 14:26:08)
Message:

scheduler: Add and use _Scheduler_default_Tick()

Delete _Scheduler_priority_Tick(). Use _SMP_Get_processor_count() for
default tick operation. Delete _Scheduler_simple_smp_Tick().

Location:
cpukit/score
Files:
1 deleted
7 edited
1 moved

Legend:

Unmodified
Added
Removed
  • cpukit/score/Makefile.am

    r6eba7c85 ra344308  
    137137libscore_a_SOURCES += src/isrsmp.c src/smp.c \
    138138    src/schedulersimplesmpblock.c src/schedulersimplesmpschedule.c \
    139     src/schedulersimplesmpunblock.c src/schedulersimplesmptick.c
     139    src/schedulersimplesmpunblock.c
    140140endif
    141141
     
    198198## SCHEDULER_C_FILES
    199199libscore_a_SOURCES += src/scheduler.c
     200libscore_a_SOURCES += src/schedulerdefaulttick.c
    200201libscore_a_SOURCES += src/schedulerdefaultstartidle.c
    201202
     
    203204libscore_a_SOURCES += src/schedulerpriority.c \
    204205    src/schedulerpriorityallocate.c \
    205     src/schedulerprioritytick.c \
    206206    src/schedulerpriorityblock.c \
    207207    src/schedulerpriorityenqueue.c \
  • cpukit/score/include/rtems/score/scheduler.h

    r6eba7c85 ra344308  
    151151
    152152/**
     153 * @brief Performs tick operations depending on the CPU budget algorithm for
     154 * each executing thread.
     155 *
     156 * This routine is invoked as part of processing each clock tick.
     157 */
     158void _Scheduler_default_Tick( void );
     159
     160/**
    153161 * @brief Unblocks the thread.
    154162 *
  • cpukit/score/include/rtems/score/schedulercbs.h

    r6eba7c85 ra344308  
    6161    _Scheduler_EDF_Priority_compare, /* compares two priorities */ \
    6262    _Scheduler_CBS_Release_job,      /* new period of task */ \
    63     _Scheduler_priority_Tick,        /* tick entry point */ \
     63    _Scheduler_default_Tick,         /* tick entry point */ \
    6464    _Scheduler_default_Start_idle    /* start idle entry point */ \
    6565  }
  • cpukit/score/include/rtems/score/scheduleredf.h

    r6eba7c85 ra344308  
    5454    _Scheduler_EDF_Priority_compare, /* compares two priorities */ \
    5555    _Scheduler_EDF_Release_job,      /* new period of task */ \
    56     _Scheduler_priority_Tick,        /* tick entry point */ \
     56    _Scheduler_default_Tick,         /* tick entry point */ \
    5757    _Scheduler_default_Start_idle    /* start idle entry point */ \
    5858  }
  • cpukit/score/include/rtems/score/schedulerpriority.h

    r6eba7c85 ra344308  
    5353    _Scheduler_priority_Priority_compare, /* compares two priorities */ \
    5454    _Scheduler_priority_Release_job,      /* new period of task */ \
    55     _Scheduler_priority_Tick,             /* tick entry point */ \
     55    _Scheduler_default_Tick,              /* tick entry point */ \
    5656    _Scheduler_default_Start_idle         /* start idle entry point */ \
    5757  }
     
    227227
    228228/**
    229  *  @brief Determines if the current thread allows timeslicing.
    230  *
    231  *  This routine is invoked as part of processing each clock tick.
    232  *  It is responsible for determining if the current thread allows
    233  *  timeslicing and, if so, when its timeslice expires.
    234  */
    235 void _Scheduler_priority_Tick( void );
    236 
    237 /**
    238229 *  This is the major bit map.
    239230 */
  • cpukit/score/include/rtems/score/schedulersimple.h

    r6eba7c85 ra344308  
    5151    _Scheduler_priority_Priority_compare, /* compares two priorities */ \
    5252    _Scheduler_priority_Release_job,      /* new period of task */ \
    53     _Scheduler_priority_Tick,             /* tick entry point */ \
     53    _Scheduler_default_Tick,              /* tick entry point */ \
    5454    _Scheduler_default_Start_idle         /* start idle entry point */ \
    5555  }
  • cpukit/score/include/rtems/score/schedulersimplesmp.h

    r6eba7c85 ra344308  
    6363    _Scheduler_priority_Priority_compare, /* compares two priorities */ \
    6464    _Scheduler_priority_Release_job,      /* new period of task */ \
    65     _Scheduler_simple_smp_Tick            /* tick entry point */ \
     65    _Scheduler_default_Tick               /* tick entry point */ \
    6666  }
    6767
     
    103103);
    104104
    105 /**
    106  *  @brief Invoked as part of processing each SMP clock tick.
    107  *
    108  *  This routine is invoked as part of processing each clock tick.
    109  *  It is responsible for determining if the current thread allows
    110  *  timeslicing and, if so, when its timeslice expires.
    111  */
    112 void _Scheduler_simple_smp_Tick( void );
    113 
    114105#ifdef __cplusplus
    115106}
  • cpukit/score/src/schedulerdefaulttick.c

    r6eba7c85 ra344308  
    22 * @file
    33 *
    4  * @brief Priority Scheduler At Tick Handler
     4 * @brief Default Scheduler At Tick Handler
    55 *
    66 * @ingroup ScoreScheduler
     
    2121
    2222#include <rtems/system.h>
    23 #include <rtems/score/schedulerpriority.h>
     23#include <rtems/score/scheduler.h>
     24#include <rtems/score/thread.h>
     25#include <rtems/score/smp.h>
    2426
    25 void _Scheduler_priority_Tick( void )
     27static void _Scheduler_default_Tick_for_executing( Thread_Control *executing )
    2628{
    27   Thread_Control *executing;
    28 
    29   executing = _Thread_Executing;
    30 
    3129  #ifdef __RTEMS_USE_TICKS_FOR_STATISTICS__
    3230    /*
     
    8280  }
    8381}
     82
     83void _Scheduler_default_Tick( void )
     84{
     85  uint32_t processor_count = _SMP_Get_processor_count();
     86  uint32_t processor;
     87
     88  for ( processor = 0 ; processor < processor_count ; ++processor ) {
     89    _Scheduler_default_Tick_for_executing(
     90      _Per_CPU_Information[ processor ].executing
     91    );
     92  }
     93}
Note: See TracChangeset for help on using the changeset viewer.