diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-06-17 14:31:46 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-06-17 14:31:46 +0000 |
commit | 3203e09507da6484f267605793fd770586a63d55 (patch) | |
tree | 882a86450acc183b1485995ae7b14e430e27a358 /cpukit/score/include | |
parent | 2011-04-10 Kate Feng <feng@bnl.gov> (diff) | |
download | rtems-3203e09507da6484f267605793fd770586a63d55.tar.bz2 |
2011-06-17 Joel Sherrill <joel.sherrill@oarcorp.com>
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.
Diffstat (limited to 'cpukit/score/include')
-rw-r--r-- | cpukit/score/include/rtems/score/scheduler.h | 3 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/schedulerpriority.h | 12 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/schedulersimple.h | 4 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/schedulersimplesmp.h | 13 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/thread.h | 9 |
5 files changed, 30 insertions, 11 deletions
diff --git a/cpukit/score/include/rtems/score/scheduler.h b/cpukit/score/include/rtems/score/scheduler.h index c094b9400a..2c99a3d7f5 100644 --- a/cpukit/score/include/rtems/score/scheduler.h +++ b/cpukit/score/include/rtems/score/scheduler.h @@ -74,6 +74,9 @@ typedef struct { /** extract a thread from the ready set */ void ( *extract )(Thread_Control *); + + /** perform scheduler update actions required at each clock tick */ + void ( *tick )(void); } Scheduler_Operations; /** diff --git a/cpukit/score/include/rtems/score/schedulerpriority.h b/cpukit/score/include/rtems/score/schedulerpriority.h index 2cd2353204..2f164b7635 100644 --- a/cpukit/score/include/rtems/score/schedulerpriority.h +++ b/cpukit/score/include/rtems/score/schedulerpriority.h @@ -48,7 +48,8 @@ extern "C" { _Scheduler_priority_Update, /* update entry point */ \ _Scheduler_priority_Enqueue, /* enqueue entry point */ \ _Scheduler_priority_Enqueue_first, /* enqueue_first entry point */ \ - _Scheduler_priority_Extract /* extract entry point */ \ + _Scheduler_priority_Extract, /* extract entry point */ \ + _Scheduler_priority_Tick /* tick entry point */ \ } /** @@ -171,6 +172,15 @@ void _Scheduler_priority_Extract( ); /** + * @brief Deterministic Priority Scheduler Tick Method + * + * This routine is invoked as part of processing each clock tick. + * It is responsible for determining if the current thread allows + * timeslicing and, if so, when its timeslice expires. + */ +void _Scheduler_priority_Tick( void ); + +/** * This is the major bit map. */ extern volatile Priority_bit_map_Control _Priority_Major_bit_map; diff --git a/cpukit/score/include/rtems/score/schedulersimple.h b/cpukit/score/include/rtems/score/schedulersimple.h index d81939e49c..902349adfb 100644 --- a/cpukit/score/include/rtems/score/schedulersimple.h +++ b/cpukit/score/include/rtems/score/schedulersimple.h @@ -28,6 +28,7 @@ extern "C" { #endif #include <rtems/score/scheduler.h> +#include <rtems/score/schedulerpriority.h> /** * Entry points for Scheduler Simple @@ -44,7 +45,8 @@ extern "C" { _Scheduler_simple_Update, /* update entry point */ \ _Scheduler_simple_Enqueue, /* enqueue entry point */ \ _Scheduler_simple_Enqueue_first, /* enqueue_first entry point */ \ - _Scheduler_simple_Extract /* extract entry point */ \ + _Scheduler_simple_Extract, /* extract entry point */ \ + _Scheduler_priority_Tick /* tick entry point */ \ } /** diff --git a/cpukit/score/include/rtems/score/schedulersimplesmp.h b/cpukit/score/include/rtems/score/schedulersimplesmp.h index 462eaf00e6..55c24ea41d 100644 --- a/cpukit/score/include/rtems/score/schedulersimplesmp.h +++ b/cpukit/score/include/rtems/score/schedulersimplesmp.h @@ -56,7 +56,8 @@ extern "C" { _Scheduler_simple_Update, /* update entry point */ \ _Scheduler_simple_Enqueue, /* enqueue entry point */ \ _Scheduler_simple_Enqueue_first, /* enqueue_first entry point */ \ - _Scheduler_simple_Extract /* extract entry point */ \ + _Scheduler_simple_Extract, /* extract entry point */ \ + _Scheduler_simple_smp_Tick /* tick entry point */ \ } /** @@ -95,6 +96,16 @@ void _Scheduler_simple_smp_Unblock( Thread_Control *the_thread ); +/** + * @brief Scheduler Simple SMP Tick Method + * + * This routine is invoked as part of processing each clock tick. + * It is responsible for determining if the current thread allows + * timeslicing and, if so, when its timeslice expires. + */ +void _Scheduler_simple_smp_Tick( void ); + +/** #ifdef __cplusplus } #endif diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index 8e469f4058..c1b5d14b47 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -6,7 +6,7 @@ */ /* - * COPYRIGHT (c) 1989-2011. + * COPYRIGHT (c) 1989-2009. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -660,13 +660,6 @@ void _Thread_Set_transient( ); /** - * This routine is invoked as part of processing each clock tick. - * It is responsible for determining if the current thread allows - * timeslicing and, if so, when its timeslice expires. - */ -void _Thread_Tickle_timeslice( void ); - -/** * This routine initializes the context of the_thread to its * appropriate starting state. */ |