Changeset 3203e09 in rtems


Ignore:
Timestamp:
Jun 17, 2011, 2:31:46 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
4b72da4
Parents:
169480b
Message:

2011-06-17 Joel Sherrill <joel.sherrill@…>

PR 1819/cpukit

  • rtems/src/clocktick.c, score/Makefile.am, score/include/rtems/score/scheduler.h, score/include/rtems/score/schedulerpriority.h, score/include/rtems/score/schedulersimple.h, score/include/rtems/score/schedulersimplesmp.h, score/include/rtems/score/thread.h, score/inline/rtems/score/scheduler.inl: Add a scheduler entry point which is invoked at each clock tick. _Thread_Tickle_timeslice() is now a method owned by the Deterministic Priority Scheduler and shared by the Simple Priority Scheduler. The Simple SMP Scheduler has its own variation on this which does timeslicing bookkeeping on all cores.
  • score/src/schedulerprioritytick.c, score/src/schedulersimplesmptick.c: New files.
  • score/src/threadtickletimeslice.c: Removed.
Location:
cpukit
Files:
1 added
9 edited
1 moved

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r169480b r3203e09  
     12011-06-17      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        PR 1819/cpukit
     4        * rtems/src/clocktick.c, score/Makefile.am,
     5        score/include/rtems/score/scheduler.h,
     6        score/include/rtems/score/schedulerpriority.h,
     7        score/include/rtems/score/schedulersimple.h,
     8        score/include/rtems/score/schedulersimplesmp.h,
     9        score/include/rtems/score/thread.h,
     10        score/inline/rtems/score/scheduler.inl: Add a scheduler entry point
     11        which is invoked at each clock tick. _Thread_Tickle_timeslice() is
     12        now a method owned by the Deterministic Priority Scheduler and shared
     13        by the Simple Priority Scheduler. The Simple SMP Scheduler has its
     14        own variation on this which does timeslicing bookkeeping on all
     15        cores.
     16        * score/src/schedulerprioritytick.c,
     17        score/src/schedulersimplesmptick.c: New files.
     18        * score/src/threadtickletimeslice.c: Removed.
     19
    1202011-06-17      Sebastian Huber <sebastian.huber@embedded-brains.de>
    221
  • cpukit/rtems/src/clocktick.c

    r169480b r3203e09  
    11/*
    2  *  Clock Manager
    3  *
    4  *  COPYRIGHT (c) 1989-1999.
     2 *  COPYRIGHT (c) 1989-2009.
    53 *  On-Line Applications Research Corporation (OAR).
    64 *
     
    4644  _Watchdog_Tickle_ticks();
    4745
    48   _Thread_Tickle_timeslice();
     46  _Scheduler_Tick();
    4947
    5048  if ( _Thread_Is_context_switch_necessary() &&
  • cpukit/score/Makefile.am

    r169480b r3203e09  
    135135libscore_a_SOURCES += src/smp.c src/smplock.c \
    136136    src/schedulersimplesmpblock.c src/schedulersimplesmpschedule.c \
    137     src/schedulersimplesmpunblock.c
     137    src/schedulersimplesmpunblock.c src/schedulerprioritytick.c
    138138endif
    139139
     
    197197libscore_a_SOURCES += src/schedulerpriority.c \
    198198    src/schedulerpriorityallocate.c \
     199    src/schedulerprioritytick.c \
    199200    src/schedulerpriorityblock.c \
    200201    src/schedulerpriorityenqueue.c \
     
    240241    src/threadsetstate.c src/threadsettransient.c \
    241242    src/threadstackallocate.c src/threadstackfree.c src/threadstart.c \
    242     src/threadstartmultitasking.c src/threadtickletimeslice.c \
    243     src/iterateoverthreads.c src/threadblockingoperationcancel.c
     243    src/threadstartmultitasking.c src/iterateoverthreads.c \
     244    src/threadblockingoperationcancel.c
    244245   
    245246if HAS_SMP
  • cpukit/score/include/rtems/score/scheduler.h

    r169480b r3203e09  
    7575  /** extract a thread from the ready set */
    7676  void ( *extract )(Thread_Control *);
     77
     78  /** perform scheduler update actions required at each clock tick */
     79  void ( *tick )(void);
    7780} Scheduler_Operations;
    7881
  • cpukit/score/include/rtems/score/schedulerpriority.h

    r169480b r3203e09  
    4949    _Scheduler_priority_Enqueue,       /* enqueue entry point */ \
    5050    _Scheduler_priority_Enqueue_first, /* enqueue_first entry point */ \
    51     _Scheduler_priority_Extract        /* extract entry point */ \
     51    _Scheduler_priority_Extract,       /* extract entry point */ \
     52    _Scheduler_priority_Tick           /* tick entry point */ \
    5253  }
    5354
     
    172173
    173174/**
     175 *  @brief Deterministic Priority Scheduler Tick Method
     176 *
     177 *  This routine is invoked as part of processing each clock tick.
     178 *  It is responsible for determining if the current thread allows
     179 *  timeslicing and, if so, when its timeslice expires.
     180 */
     181void _Scheduler_priority_Tick( void );
     182
     183/**
    174184 *  This is the major bit map.
    175185 */
  • cpukit/score/include/rtems/score/schedulersimple.h

    r169480b r3203e09  
    2929
    3030#include <rtems/score/scheduler.h>
     31#include <rtems/score/schedulerpriority.h>
    3132
    3233/**
     
    4546    _Scheduler_simple_Enqueue,       /* enqueue entry point */ \
    4647    _Scheduler_simple_Enqueue_first, /* enqueue_first entry point */ \
    47     _Scheduler_simple_Extract        /* extract entry point */ \
     48    _Scheduler_simple_Extract,       /* extract entry point */ \
     49    _Scheduler_priority_Tick         /* tick entry point */ \
    4850  }
    4951
  • cpukit/score/include/rtems/score/schedulersimplesmp.h

    r169480b r3203e09  
    5757    _Scheduler_simple_Enqueue,       /* enqueue entry point */ \
    5858    _Scheduler_simple_Enqueue_first, /* enqueue_first entry point */ \
    59     _Scheduler_simple_Extract        /* extract entry point */ \
     59    _Scheduler_simple_Extract,       /* extract entry point */ \
     60    _Scheduler_simple_smp_Tick       /* tick entry point */ \
    6061  }
    6162
     
    9697);
    9798
     99/**
     100 *  @brief Scheduler Simple SMP Tick Method
     101 *
     102 *  This routine is invoked as part of processing each clock tick.
     103 *  It is responsible for determining if the current thread allows
     104 *  timeslicing and, if so, when its timeslice expires.
     105 */
     106void _Scheduler_simple_smp_Tick( void );
     107
     108/**
    98109#ifdef __cplusplus
    99110}
  • cpukit/score/include/rtems/score/thread.h

    r169480b r3203e09  
    77
    88/*
    9  *  COPYRIGHT (c) 1989-2011.
     9 *  COPYRIGHT (c) 1989-2009.
    1010 *  On-Line Applications Research Corporation (OAR).
    1111 *
     
    661661
    662662/**
    663  *  This routine is invoked as part of processing each clock tick.
    664  *  It is responsible for determining if the current thread allows
    665  *  timeslicing and, if so, when its timeslice expires.
    666  */
    667 void _Thread_Tickle_timeslice( void );
    668 
    669 /**
    670663 *  This routine initializes the context of the_thread to its
    671664 *  appropriate starting state.
  • cpukit/score/inline/rtems/score/scheduler.inl

    r169480b r3203e09  
    160160}
    161161
     162/** @brief Scheduler Method Invoked at Each Clock Tick
     163 *
     164 * This method is invoked at each clock tick to allow the scheduler
     165 * implementation to perform any activities required.  For the
     166 * scheduler which support standard RTEMS features, this includes
     167 * time-slicing management.
     168 */
     169RTEMS_INLINE_ROUTINE void _Scheduler_Tick( void )
     170{
     171  _Scheduler.Operations.tick();
     172}
     173
    162174/**@}*/
    163175
  • cpukit/score/src/schedulerprioritytick.c

    r169480b r3203e09  
    11/*
    2  *  Thread Handler
    3  *
    4  *
    52 *  COPYRIGHT (c) 1989-2009.
    63 *  On-Line Applications Research Corporation (OAR).
     
    1815
    1916#include <rtems/system.h>
    20 #include <rtems/score/apiext.h>
    21 #include <rtems/score/context.h>
    22 #include <rtems/score/interr.h>
    23 #include <rtems/score/isr.h>
    24 #include <rtems/score/object.h>
    25 #include <rtems/score/priority.h>
    26 #include <rtems/score/scheduler.h>
    27 #include <rtems/score/states.h>
    28 #include <rtems/score/sysstate.h>
    29 #include <rtems/score/thread.h>
    30 #include <rtems/score/threadq.h>
    31 #include <rtems/score/userext.h>
    32 #include <rtems/score/wkspace.h>
     17#include <rtems/score/schedulerpriority.h>
    3318
    34 /*PAGE
    35  *
    36  *  _Thread_Tickle_timeslice
    37  *
    38  *  This scheduler routine determines if timeslicing is enabled
    39  *  for the currently executing thread and, if so, updates the
    40  *  timeslice count and checks for timeslice expiration.
    41  *
    42  *  Input parameters:   NONE
    43  *
    44  *  Output parameters:  NONE
    45  */
    46 
    47 void _Thread_Tickle_timeslice( void )
     19void _Scheduler_priority_Tick( void )
    4820{
    4921  Thread_Control *executing;
Note: See TracChangeset for help on using the changeset viewer.