change log for rtems (2011-02-18)

rtems-vc at rtems.org rtems-vc at rtems.org
Fri Feb 18 16:10:33 UTC 2011


 *joel*:
2011-02-18	Joel Sherrill <joel.sherrill at oarcorp.com>

	* sapi/include/confdefs.h, score/Makefile.am,
	score/include/rtems/score/scheduler.h,
	score/include/rtems/score/schedulerpriority.h,
	score/include/rtems/score/thread.h,
	score/inline/rtems/score/scheduler.inl,
	score/inline/rtems/score/schedulerpriority.inl,
	score/src/scheduler.c, score/src/schedulerpriority.c,
	score/src/schedulerpriorityblock.c,
	score/src/schedulerpriorityschedule.c,
	score/src/schedulerpriorityunblock.c,
	score/src/schedulerpriorityyield.c, score/src/threadchangepriority.c,
	score/src/threadclose.c, score/src/threadinitialize.c,
	score/src/threadsetpriority.c, score/src/threadsettransient.c:
	Significant clean up on Scheduler Plugin Interface. Names were
	shortened. Missing operations added. Many scheduler files had
	unneeded includes removed. Made pointer to scheduler information in
	Thread_Control and Scheduler_Control a void * pointer because the
	thread and scheduler wrapper should be unaware of scheduler types AND
	this is broken for user provided schedulers.
	* score/src/schedulerpriorityallocate.c,
	score/src/schedulerpriorityenqueue.c,
	score/src/schedulerpriorityenqueuefirst.c,
	score/src/schedulerpriorityextract.c,
	score/src/schedulerpriorityfree.c,
	score/src/schedulerpriorityupdate.c: New files.
	* score/src/schedulerprioritythreadschedulerallocate.c,
	score/src/schedulerprioritythreadschedulerfree.c,
	score/src/schedulerprioritythreadschedulerupdate.c: Removed.

M 1.2719  cpukit/ChangeLog
M  1.156  cpukit/sapi/include/confdefs.h
M   1.91  cpukit/score/Makefile.am
M    1.5  cpukit/score/include/rtems/score/scheduler.h
M    1.4  cpukit/score/include/rtems/score/schedulerpriority.h
M   1.99  cpukit/score/include/rtems/score/thread.h
M    1.4  cpukit/score/inline/rtems/score/scheduler.inl
M    1.5  cpukit/score/inline/rtems/score/schedulerpriority.inl
M    1.3  cpukit/score/src/scheduler.c
M    1.4  cpukit/score/src/schedulerpriority.c
A    1.1  cpukit/score/src/schedulerpriorityallocate.c
M    1.4  cpukit/score/src/schedulerpriorityblock.c
A    1.1  cpukit/score/src/schedulerpriorityenqueue.c
A    1.1  cpukit/score/src/schedulerpriorityenqueuefirst.c
A    1.1  cpukit/score/src/schedulerpriorityextract.c
A    1.1  cpukit/score/src/schedulerpriorityfree.c
M    1.4  cpukit/score/src/schedulerpriorityschedule.c
R    1.3  cpukit/score/src/schedulerprioritythreadschedulerallocate.c
R    1.3  cpukit/score/src/schedulerprioritythreadschedulerfree.c
R    1.3  cpukit/score/src/schedulerprioritythreadschedulerupdate.c
M    1.4  cpukit/score/src/schedulerpriorityunblock.c
A    1.1  cpukit/score/src/schedulerpriorityupdate.c
M    1.6  cpukit/score/src/schedulerpriorityyield.c
M   1.18  cpukit/score/src/threadchangepriority.c
M   1.17  cpukit/score/src/threadclose.c
M   1.44  cpukit/score/src/threadinitialize.c
M    1.9  cpukit/score/src/threadsetpriority.c
M    1.9  cpukit/score/src/threadsettransient.c

diff -u rtems/cpukit/ChangeLog:1.2718 rtems/cpukit/ChangeLog:1.2719
--- rtems/cpukit/ChangeLog:1.2718	Thu Feb 17 16:21:43 2011
+++ rtems/cpukit/ChangeLog	Fri Feb 18 09:12:43 2011
@@ -1,3 +1,34 @@
+2011-02-18	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	* sapi/include/confdefs.h, score/Makefile.am,
+	score/include/rtems/score/scheduler.h,
+	score/include/rtems/score/schedulerpriority.h,
+	score/include/rtems/score/thread.h,
+	score/inline/rtems/score/scheduler.inl,
+	score/inline/rtems/score/schedulerpriority.inl,
+	score/src/scheduler.c, score/src/schedulerpriority.c,
+	score/src/schedulerpriorityblock.c,
+	score/src/schedulerpriorityschedule.c,
+	score/src/schedulerpriorityunblock.c,
+	score/src/schedulerpriorityyield.c, score/src/threadchangepriority.c,
+	score/src/threadclose.c, score/src/threadinitialize.c,
+	score/src/threadsetpriority.c, score/src/threadsettransient.c:
+	Significant clean up on Scheduler Plugin Interface. Names were
+	shortened. Missing operations added. Many scheduler files had
+	unneeded includes removed. Made pointer to scheduler information in
+	Thread_Control and Scheduler_Control a void * pointer because the
+	thread and scheduler wrapper should be unaware of scheduler types AND
+	this is broken for user provided schedulers.
+	* score/src/schedulerpriorityallocate.c,
+	score/src/schedulerpriorityenqueue.c,
+	score/src/schedulerpriorityenqueuefirst.c,
+	score/src/schedulerpriorityextract.c,
+	score/src/schedulerpriorityfree.c,
+	score/src/schedulerpriorityupdate.c: New files.
+	* score/src/schedulerprioritythreadschedulerallocate.c,
+	score/src/schedulerprioritythreadschedulerfree.c,
+	score/src/schedulerprioritythreadschedulerupdate.c: Removed.
+
 2011-02-17	Joel Sherrill <joel.sherrill at oarcorp.com>
 
 	* sapi/include/confdefs.h, sapi/include/rtems/config.h,

diff -u rtems/cpukit/sapi/include/confdefs.h:1.155 rtems/cpukit/sapi/include/confdefs.h:1.156
--- rtems/cpukit/sapi/include/confdefs.h:1.155	Thu Feb 17 16:21:44 2011
+++ rtems/cpukit/sapi/include/confdefs.h	Fri Feb 18 09:12:43 2011
@@ -603,8 +603,8 @@
  */
 #ifdef CONFIGURE_INIT
   Scheduler_Control  _Scheduler = {
-    .Ready_queues.priority = NULL,
-    .Operations            = SCHEDULER_ENTRY_POINTS
+    .information = NULL,
+    .Operations  = SCHEDULER_ENTRY_POINTS
   };
 #endif
 

diff -u rtems/cpukit/score/Makefile.am:1.90 rtems/cpukit/score/Makefile.am:1.91
--- rtems/cpukit/score/Makefile.am:1.90	Thu Dec 16 08:50:12 2010
+++ rtems/cpukit/score/Makefile.am	Fri Feb 18 09:12:43 2011
@@ -144,13 +144,16 @@
 
 ## SCHEDULERPRIORITY_C_FILES
 libscore_a_SOURCES += src/schedulerpriority.c \
-											src/schedulerpriorityblock.c \
-                      src/schedulerprioritythreadschedulerallocate.c \
-                      src/schedulerprioritythreadschedulerfree.c \
-                      src/schedulerprioritythreadschedulerupdate.c \
-											src/schedulerpriorityschedule.c \
-											src/schedulerpriorityunblock.c \
-											src/schedulerpriorityyield.c
+    src/schedulerpriorityallocate.c \
+    src/schedulerpriorityblock.c \
+    src/schedulerpriorityenqueue.c \
+    src/schedulerpriorityenqueuefirst.c \
+    src/schedulerpriorityextract.c \
+    src/schedulerpriorityfree.c \
+    src/schedulerpriorityschedule.c \
+    src/schedulerpriorityunblock.c \
+    src/schedulerpriorityupdate.c \
+    src/schedulerpriorityyield.c
 
 ## PROTECTED_HEAP_C_FILES
 libscore_a_SOURCES += src/pheapallocate.c \

diff -u rtems/cpukit/score/include/rtems/score/scheduler.h:1.4 rtems/cpukit/score/include/rtems/score/scheduler.h:1.5
--- rtems/cpukit/score/include/rtems/score/scheduler.h:1.4	Thu Feb 17 16:21:44 2011
+++ rtems/cpukit/score/include/rtems/score/scheduler.h	Fri Feb 18 09:12:43 2011
@@ -36,35 +36,6 @@
  */
 /**@{*/
 
-typedef struct Scheduler_Control_struct Scheduler_Control;
-
-/*
- * This type defines the scheduler initialization table entry, which is set up
- * by confdefs.h based on the user's choice of scheduler policy.
- */
-typedef struct {
-  void ( *scheduler_init )( Scheduler_Control * );
-} Scheduler_Table_entry;
-
-/**
- * The following Scheduler_Per_thread_xxx structures are used to
- * hold per-thread data used by the scheduler.  Thread_Control->scheduler is a
- * union of pointers, one for each of the following structures.  The
- * scheduler->xxx field points to an instantion of one of these structures,
- * which is allocated from the workspace during _Thread_Start.
- */
-
-/**
- * Per-thread data related to the _Scheduler_PRIORITY scheduling policy.
- */
-typedef struct {
-  /** This field points to the Ready FIFO for this thread's priority. */
-  Chain_Control                        *ready_chain;
-
-  /** This field contains precalculated priority map indices. */
-  Priority_bit_map_Information          Priority_map;
-} Scheduler_priority_Per_thread;
-
 /**
  * function jump table that holds pointers to the functions that
  * implement specific schedulers.
@@ -86,37 +57,39 @@
   void ( *unblock )(Thread_Control *);
 
   /** allocates the scheduler field of the given thread */
-  void * ( *scheduler_allocate )(Thread_Control *);
+  void * ( *allocate )(Thread_Control *);
 
   /** frees the scheduler field of the given thread */
-  void ( *scheduler_free )(Thread_Control *);
+  void ( *free )(Thread_Control *);
 
   /** updates the scheduler field of the given thread -- primarily used
    * when changing the thread's priority. */
-  void ( *scheduler_update )(Thread_Control *);
+  void ( *update )(Thread_Control *);
+
+  /** enqueue a thread as the last of its priority group */
+  void ( *enqueue )(Thread_Control *);
+
+  /** enqueue a thread as the first of its priority group */
+  void ( *enqueue_first )(Thread_Control *);
+
+  /** extract a thread from the ready set */
+  void ( *extract )(Thread_Control *);
 } Scheduler_Operations;
 
 /**
  * This is the structure used to manage the scheduler.
  */
-struct Scheduler_Control_struct {
+typedef struct {
   /**
-   *  This union contains the pointer to the data structure used to manage
-   *  the ready set of tasks. The pointer varies based upon the type of
+   *  This points to the data structure used to manage the ready set of
+   *  tasks. The pointer varies based upon the type of
    *  ready queue required by the scheduler.
    */
-  union {
-    /**
-     * This is the set of lists (an array of Chain_Control) for
-     * priority scheduling.
-     */
-    Chain_Control            *priority;
-
-  } Ready_queues;
+  void                   *information;
 
   /** The jump table for scheduler-specific functions */
-  Scheduler_Operations        Operations;
-};
+  Scheduler_Operations    Operations;
+} Scheduler_Control;
 
 /**
  *  The _Scheduler holds the structures used to manage the

diff -u rtems/cpukit/score/include/rtems/score/schedulerpriority.h:1.3 rtems/cpukit/score/include/rtems/score/schedulerpriority.h:1.4
--- rtems/cpukit/score/include/rtems/score/schedulerpriority.h:1.3	Thu Feb 17 16:21:44 2011
+++ rtems/cpukit/score/include/rtems/score/schedulerpriority.h	Fri Feb 18 09:12:43 2011
@@ -21,9 +21,7 @@
 
 #include <rtems/score/chain.h>
 #include <rtems/score/priority.h>
-#include <rtems/score/percpu.h>
 #include <rtems/score/scheduler.h>
-#include <rtems/score/wkspace.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -40,17 +38,31 @@
  */
 #define SCHEDULER_PRIORITY_ENTRY_POINTS \
   { \
-    .initialize         = _Scheduler_priority_Initialize, \
-    .schedule           = _Scheduler_priority_Schedule, \
-    .yield              = _Scheduler_priority_Yield, \
-    .block              = _Scheduler_priority_Block, \
-    .unblock            = _Scheduler_priority_Unblock, \
-    .scheduler_allocate = _Scheduler_priority_Thread_scheduler_allocate, \
-    .scheduler_free     = _Scheduler_priority_Thread_scheduler_free, \
-    .scheduler_update   = _Scheduler_priority_Thread_scheduler_update \
+    .initialize    = _Scheduler_priority_Initialize, \
+    .schedule      = _Scheduler_priority_Schedule, \
+    .yield         = _Scheduler_priority_Yield, \
+    .block         = _Scheduler_priority_Block, \
+    .unblock       = _Scheduler_priority_Unblock, \
+    .allocate      = _Scheduler_priority_Allocate, \
+    .free          = _Scheduler_priority_Free, \
+    .update        = _Scheduler_priority_Update, \
+    .enqueue       = _Scheduler_priority_Enqueue, \
+    .enqueue_first = _Scheduler_priority_Enqueue_first, \
+    .extract       = _Scheduler_priority_Extract \
   }
 
 /**
+ * Per-thread data related to the _Scheduler_PRIORITY scheduling policy.
+ */
+typedef struct {
+  /** This field points to the Ready FIFO for this thread's priority. */
+  Chain_Control                        *ready_chain;
+
+  /** This field contains precalculated priority map indices. */
+  Priority_bit_map_Information          Priority_map;
+} Scheduler_priority_Per_thread;
+
+/**
  * This routine initializes the priority scheduler.
  */
 void _Scheduler_priority_Initialize(void);
@@ -60,6 +72,8 @@
  *  that is, removes it from the ready queue.  It performs
  *  any necessary scheduling operations including the selection of
  *  a new heir thread.
+ *
+ *  @param[in] the_thread is the thread to be blocked
  */
 void _Scheduler_priority_Block( 
   Thread_Control    *the_thread 
@@ -72,24 +86,33 @@
 void _Scheduler_priority_Schedule(void);
 
 /**
- * This routine allocates @a the_thread->scheduler.
+ *  This routine allocates @a the_thread->scheduler.
+ *
+ *  @param[in] the_thread is the thread the scheduler is allocating
+ *             management memory for
  */
-void * _Scheduler_priority_Thread_scheduler_allocate(
+void * _Scheduler_priority_Allocate(
   Thread_Control      *the_thread
 );
 
 /**
- * This routine frees @a the_thread->scheduler.
+ *  This routine frees @a the_thread->scheduler.
+ *
+ *  @param[in] the_thread is the thread whose scheduler specific information
+ *             will be deallocated.
  */
-void _Scheduler_priority_Thread_scheduler_free(
+void _Scheduler_priority_Free(
   Thread_Control      *the_thread
 );
 
 /**
- * This routine updates @a the_thread->scheduler based on @a the_scheduler 
- * structures and thread state
+ *  This routine updates @a the_thread->scheduler based on @a the_scheduler 
+ *  structures and thread state.
+ *
+ *  @param[in] the_thread will have its scheduler specific information
+ *             structure updated.
  */
-void _Scheduler_priority_Thread_scheduler_update(
+void _Scheduler_priority_Update(
   Thread_Control      *the_thread
 );
 
@@ -97,6 +120,8 @@
  *  This routine adds @a the_thread to the scheduling decision, 
  *  that is, adds it to the ready queue and 
  *  updates any appropriate scheduling variables, for example the heir thread.
+ *
+ *  @param[in] the_thread will be unblocked
  */
 void _Scheduler_priority_Unblock(
   Thread_Control    *the_thread 
@@ -115,6 +140,36 @@
  */
 void _Scheduler_priority_Yield( void );
 
+/**
+ *  This routine puts @a the_thread on to the priority-based ready queue.
+ *
+ *  @param[in] the_thread will be enqueued at the TAIL of its priority.
+ */
+void _Scheduler_priority_Enqueue(
+  Thread_Control    *the_thread
+);
+
+/**
+ *  This routine puts @a the_thread to the head of the ready queue. 
+ *  For priority-based ready queues, the thread will be the first thread
+ *  at its priority level.
+ *
+ *  @param[in] the_thread will be enqueued at the HEAD of its priority.
+ */
+void _Scheduler_priority_Enqueue_first(
+  Thread_Control    *the_thread
+);
+
+/**
+ *  This routine removes a specific thread from the scheduler's set
+ *  of ready threads.
+ *
+ *  @param[in] the_thread will be extracted from the ready set.
+ */
+void _Scheduler_priority_Extract(
+  Thread_Control     *the_thread
+);
+
 #ifndef __RTEMS_APPLICATION__
 #include <rtems/score/schedulerpriority.inl>
 #endif

diff -u rtems/cpukit/score/include/rtems/score/thread.h:1.98 rtems/cpukit/score/include/rtems/score/thread.h:1.99
--- rtems/cpukit/score/include/rtems/score/thread.h:1.98	Wed Nov 24 09:51:27 2010
+++ rtems/cpukit/score/include/rtems/score/thread.h	Fri Feb 18 09:12:43 2011
@@ -6,7 +6,7 @@
  */
 
 /*
- *  COPYRIGHT (c) 1989-2009.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -390,10 +390,10 @@
    *  since it was created.
    */
   Thread_CPU_usage_t                    cpu_time_used;
-  /** This union holds per-thread data for the scheduler and ready queue. */
-  union {
-    Scheduler_priority_Per_thread      *priority;
-  } scheduler;
+
+  /** This pointer holds per-thread data for the scheduler and ready queue. */
+  void                                 *scheduler_info;
+
   /** This field contains information about the starting state of
    *  this thread.
    */

diff -u rtems/cpukit/score/inline/rtems/score/scheduler.inl:1.3 rtems/cpukit/score/inline/rtems/score/scheduler.inl:1.4
--- rtems/cpukit/score/inline/rtems/score/scheduler.inl:1.3	Thu Feb 17 16:21:44 2011
+++ rtems/cpukit/score/inline/rtems/score/scheduler.inl	Fri Feb 18 09:12:43 2011
@@ -93,37 +93,70 @@
   _Scheduler.Operations.unblock( the_thread );
 }
 
-/** @brief _Scheduler_Thread_scheduler_allocate
+/** @brief _Scheduler_Allocate
  *
  * This routine allocates @a the_thread->scheduler
  */
-RTEMS_INLINE_ROUTINE void* _Scheduler_Thread_scheduler_allocate( 
+RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( 
   Thread_Control    *the_thread
 )
 {
-  return _Scheduler.Operations.scheduler_allocate( the_thread );
+  return _Scheduler.Operations.allocate( the_thread );
 }
 
-/** @brief _Scheduler_Thread_scheduler_free
+/** @brief _Scheduler_Free
  *
  * This routine frees @a the_thread->scheduler
  */
-RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_free( 
+RTEMS_INLINE_ROUTINE void _Scheduler_Free( 
   Thread_Control    *the_thread
 )
 {
-  return _Scheduler.Operations.scheduler_free( the_thread );
+  return _Scheduler.Operations.free( the_thread );
 }
 
-/** @brief _Scheduler_Thread_scheduler_update
+/** @brief _Scheduler_Update
  *
  * This routine updates @a the_thread->scheduler
  */
-RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_update( 
+RTEMS_INLINE_ROUTINE void _Scheduler_Update( 
   Thread_Control    *the_thread
 )
 {
-  _Scheduler.Operations.scheduler_update( the_thread );
+  _Scheduler.Operations.update( the_thread );
+}
+
+/** @brief _Scheduler_Enqueue
+ *
+ * This routine enqueue @a the_thread->scheduler
+ */
+RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( 
+  Thread_Control    *the_thread
+)
+{
+  _Scheduler.Operations.enqueue( the_thread );
+}
+
+/** @brief _Scheduler_Enqueue_first
+ *
+ * This routine enqueue_first @a the_thread->scheduler
+ */
+RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( 
+  Thread_Control    *the_thread
+)
+{
+  _Scheduler.Operations.enqueue_first( the_thread );
+}
+
+/** @brief _Scheduler_Extract
+ *
+ * This routine extract @a the_thread->scheduler
+ */
+RTEMS_INLINE_ROUTINE void _Scheduler_Extract( 
+  Thread_Control    *the_thread
+)
+{
+  _Scheduler.Operations.extract( the_thread );
 }
 
 /**@}*/

diff -u rtems/cpukit/score/inline/rtems/score/schedulerpriority.inl:1.4 rtems/cpukit/score/inline/rtems/score/schedulerpriority.inl:1.5
--- rtems/cpukit/score/inline/rtems/score/schedulerpriority.inl:1.4	Thu Feb 17 16:21:44 2011
+++ rtems/cpukit/score/inline/rtems/score/schedulerpriority.inl	Fri Feb 18 09:12:43 2011
@@ -23,6 +23,8 @@
 #ifndef _RTEMS_SCORE_SCHEDULERPRIORITY_INL
 #define _RTEMS_SCORE_SCHEDULERPRIORITY_INL
 
+#include <rtems/score/wkspace.h>
+
 /**
  *  @addtogroup ScoreScheduler
  * @{
@@ -34,17 +36,18 @@
  */
 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_initialize(void)
 {
-  size_t index;
+  size_t         index;
+  Chain_Control *ready_queues;
 
   /* allocate ready queue structures */
-  _Scheduler.Ready_queues.priority = (Chain_Control *) 
-    _Workspace_Allocate_or_fatal_error(
-      ((size_t) PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
-    );
+  _Scheduler.information = _Workspace_Allocate_or_fatal_error(
+    ((size_t) PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
+  );
 
   /* initialize ready queue structures */
+  ready_queues = (Chain_Control *) _Scheduler.information;
   for( index=0; index <= PRIORITY_MAXIMUM; index++)
-    _Chain_Initialize_empty( &_Scheduler.Ready_queues.priority[index] );
+    _Chain_Initialize_empty( &ready_queues[index] );
 }
 
 /**
@@ -58,10 +61,15 @@
   Thread_Control                  *the_thread
 )
 {
-  _Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map );
+  Scheduler_priority_Per_thread *sched_info;
+  Chain_Control                 *ready;
+
+  sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
+  ready      = sched_info->ready_chain;
+
+  _Priority_bit_map_Add( &sched_info->Priority_map );
   
-  _Chain_Append_unprotected( the_thread->scheduler.priority->ready_chain, 
-      &the_thread->Object.Node );
+  _Chain_Append_unprotected( ready, &the_thread->Object.Node );
 }
 
 /**
@@ -77,10 +85,18 @@
   Thread_Control                   *the_thread
 )
 {
-  _Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map );
+  Scheduler_priority_Per_thread *sched_info;
+  Chain_Control                 *ready;
 
-  _Chain_Prepend_unprotected( the_thread->scheduler.priority->ready_chain, 
-      &the_thread->Object.Node );
+  sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
+  ready      = sched_info->ready_chain;
+
+  _Priority_bit_map_Add( &sched_info->Priority_map );
+
+  _Chain_Prepend_unprotected(
+    sched_info->ready_chain,
+    &the_thread->Object.Node
+  );
 }
 
 /**
@@ -95,13 +111,18 @@
   Thread_Control        *the_thread
 )
 {
-  Chain_Control         *ready  = the_thread->scheduler.priority->ready_chain;
+  Scheduler_priority_Per_thread *sched_info;
+  Chain_Control                 *ready;
+
+  sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
+  ready      = sched_info->ready_chain;
 
   if ( _Chain_Has_only_one_node( ready ) ) {
     _Chain_Initialize_empty( ready );
-    _Priority_bit_map_Remove( &the_thread->scheduler.priority->Priority_map );
-  } else
+    _Priority_bit_map_Remove( &sched_info->Priority_map );
+  } else {
     _Chain_Extract_unprotected( &the_thread->Object.Node );
+  }
 }
 
 /**
@@ -137,13 +158,19 @@
   Thread_Control            *the_thread
 )
 {
-  if ( !_Chain_Has_only_one_node(
-        the_thread->scheduler.priority->ready_chain
-        ) ) {
+  Scheduler_priority_Per_thread *sched_info;
+  Chain_Control                 *ready;
+
+  sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
+  ready      = sched_info->ready_chain;
+
+  if ( !_Chain_Has_only_one_node( sched_info->ready_chain ) ) {
     _Chain_Extract_unprotected( &the_thread->Object.Node );
 
-    _Chain_Append_unprotected( the_thread->scheduler.priority->ready_chain, 
-      &the_thread->Object.Node );
+    _Chain_Append_unprotected(
+      sched_info->ready_chain, 
+      &the_thread->Object.Node
+    );
   }
 }
 
@@ -158,74 +185,10 @@
 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
 {
   _Thread_Heir = _Scheduler_priority_Ready_queue_first(
-      _Scheduler.Ready_queues.priority
+    (Chain_Control *) _Scheduler.information
   );
 }
 
-/**
- *  @brief _Scheduler_priority_Block_body
- *
- *  This kernel routine removes the_thread from scheduling decisions based 
- * on simple queue extraction.
- *
- *  @param[in] the_thread  - pointer to thread
- */
-RTEMS_INLINE_ROUTINE void _Scheduler_priority_Block_body(
-  Thread_Control   *the_thread
-)
-{
-  _Scheduler_priority_Ready_queue_extract(the_thread);
-
-  /* TODO: flash critical section */
-
-  if ( _Thread_Is_heir( the_thread ) )
-     _Scheduler_priority_Schedule_body();
-
-  if ( _Thread_Is_executing( the_thread ) )
-    _Thread_Dispatch_necessary = true;
-
-  return;
-}
-
-/**
- *  @brief _Scheduler_priority_Unblock_body
- *
- *  This kernel routine readies the requested thread according to the queuing 
- *  discipline. A new heir thread may be selected.
- *
- *  @param[in] the_thread  - pointer to thread
- *
- *  @note This routine uses the "blocking" heir selection mechanism.
- *        This ensures the correct heir after a thread restart.
- */
-RTEMS_INLINE_ROUTINE void _Scheduler_priority_Unblock_body (
-  Thread_Control          *the_thread
-)
-{
-  _Scheduler_priority_Ready_queue_enqueue(the_thread);
-
-  /* TODO: flash critical section */
-
-  /*
-   *  If the thread that was unblocked is more important than the heir,
-   *  then we have a new heir.  This may or may not result in a
-   *  context switch.
-   *
-   *  Normal case:
-   *    If the current thread is preemptible, then we need to do
-   *    a context switch.
-   *  Pseudo-ISR case:
-   *    Even if the thread isn't preemptible, if the new heir is
-   *    a pseudo-ISR system task, we need to do a context switch.
-   */
-  if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
-    _Thread_Heir = the_thread;
-    if ( _Thread_Executing->is_preemptible ||
-        the_thread->current_priority == 0 )
-      _Thread_Dispatch_necessary = true;
-  }
-}
-
 /**@}*/
 
 #endif

diff -u rtems/cpukit/score/src/scheduler.c:1.2 rtems/cpukit/score/src/scheduler.c:1.3
--- rtems/cpukit/score/src/scheduler.c:1.2	Thu Feb 17 16:21:44 2011
+++ rtems/cpukit/score/src/scheduler.c	Fri Feb 18 09:12:43 2011
@@ -1,5 +1,5 @@
 /*
- *  Scheduler Handler
+ *  Scheduler Handler / Initialization
  *
  *  Copyright (C) 2010 Gedare Bloom.
  *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
@@ -17,24 +17,8 @@
 
 #include <rtems/system.h>
 #include <rtems/config.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
 #include <rtems/score/scheduler.h>
-#include <rtems/score/schedulerpriority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
 
-/*
- *  _Scheduler_Handler_initialization
- *
- *  This routine initializes the scheduler by calling the scheduler
- *  initialize function registered in the Configuration Scheduler Table.
- *
- *  Input parameters: NONE
- *
- *  Output parameters: NONE
- */
 void _Scheduler_Handler_initialization(void)
 {
   (*_Scheduler.Operations.initialize)();

diff -u rtems/cpukit/score/src/schedulerpriority.c:1.3 rtems/cpukit/score/src/schedulerpriority.c:1.4
--- rtems/cpukit/score/src/schedulerpriority.c:1.3	Thu Feb 17 16:21:44 2011
+++ rtems/cpukit/score/src/schedulerpriority.c	Fri Feb 18 09:12:43 2011
@@ -17,13 +17,9 @@
 
 #include <rtems/system.h>
 #include <rtems/config.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
+#include <rtems/score/prioritybitmap.h>
 #include <rtems/score/scheduler.h>
 #include <rtems/score/schedulerpriority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
 
 /* Instantiate any global variables needed by the priority scheduler */
 volatile Priority_bit_map_Control _Priority_Major_bit_map;

diff -u /dev/null rtems/cpukit/score/src/schedulerpriorityallocate.c:1.1
--- /dev/null	Fri Feb 18 10:10:30 2011
+++ rtems/cpukit/score/src/schedulerpriorityallocate.c	Fri Feb 18 09:12:43 2011
@@ -0,0 +1,35 @@
+/*
+ *  Scheduler Priority Handler / Allocate
+ *
+ *  Copyright (C) 2010 Gedare Bloom.
+ *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/system.h>
+#include <rtems/config.h>
+#include <rtems/score/scheduler.h>
+#include <rtems/score/schedulerpriority.h>
+#include <rtems/score/wkspace.h>
+
+void* _Scheduler_priority_Allocate (
+  Thread_Control        *the_thread
+)
+{
+  void *sched;
+
+  sched = _Workspace_Allocate( sizeof(Scheduler_priority_Per_thread) );
+
+  the_thread->scheduler_info = (Scheduler_priority_Per_thread*) sched;
+
+  return sched;
+}

diff -u rtems/cpukit/score/src/schedulerpriorityblock.c:1.3 rtems/cpukit/score/src/schedulerpriorityblock.c:1.4
--- rtems/cpukit/score/src/schedulerpriorityblock.c:1.3	Thu Feb 17 16:21:44 2011
+++ rtems/cpukit/score/src/schedulerpriorityblock.c	Fri Feb 18 09:12:43 2011
@@ -29,5 +29,14 @@
   Thread_Control   *the_thread
 )
 {
-  _Scheduler_priority_Block_body(the_thread);
+  _Scheduler_priority_Ready_queue_extract( the_thread );
+
+  /* TODO: flash critical section? */
+
+  if ( _Thread_Is_heir( the_thread ) )
+     _Scheduler_priority_Schedule_body();
+
+  if ( _Thread_Is_executing( the_thread ) )
+    _Thread_Dispatch_necessary = true;
+
 }

diff -u /dev/null rtems/cpukit/score/src/schedulerpriorityenqueue.c:1.1
--- /dev/null	Fri Feb 18 10:10:30 2011
+++ rtems/cpukit/score/src/schedulerpriorityenqueue.c	Fri Feb 18 09:12:44 2011
@@ -0,0 +1,26 @@
+/*
+ *  COPYRIGHT (c) 2011.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/system.h>
+#include <rtems/config.h>
+#include <rtems/score/scheduler.h>
+#include <rtems/score/schedulerpriority.h>
+
+void _Scheduler_priority_Enqueue( 
+  Thread_Control      *the_thread
+)
+{
+   _Scheduler_priority_Ready_queue_enqueue( the_thread );
+}

diff -u /dev/null rtems/cpukit/score/src/schedulerpriorityenqueuefirst.c:1.1
--- /dev/null	Fri Feb 18 10:10:30 2011
+++ rtems/cpukit/score/src/schedulerpriorityenqueuefirst.c	Fri Feb 18 09:12:44 2011
@@ -0,0 +1,27 @@
+/*
+ *  COPYRIGHT (c) 2011.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/system.h>
+#include <rtems/config.h>
+#include <rtems/score/chain.h>
+#include <rtems/score/schedulerpriority.h>
+
+void _Scheduler_priority_Enqueue_first( 
+  Thread_Control      *the_thread
+)
+{
+  _Scheduler_priority_Ready_queue_enqueue_first( the_thread );
+}
+

diff -u /dev/null rtems/cpukit/score/src/schedulerpriorityextract.c:1.1
--- /dev/null	Fri Feb 18 10:10:31 2011
+++ rtems/cpukit/score/src/schedulerpriorityextract.c	Fri Feb 18 09:12:44 2011
@@ -0,0 +1,26 @@
+/*
+ *  COPYRIGHT (c) 2011.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/system.h>
+#include <rtems/config.h>
+#include <rtems/score/chain.h>
+#include <rtems/score/schedulerpriority.h>
+
+void _Scheduler_priority_Extract( 
+  Thread_Control      *the_thread
+)
+{
+   _Scheduler_priority_Ready_queue_extract( the_thread );
+}

diff -u /dev/null rtems/cpukit/score/src/schedulerpriorityfree.c:1.1
--- /dev/null	Fri Feb 18 10:10:31 2011
+++ rtems/cpukit/score/src/schedulerpriorityfree.c	Fri Feb 18 09:12:44 2011
@@ -0,0 +1,29 @@
+/*
+ *  Scheduler Handler
+ *
+ *  Copyright (C) 2010 Gedare Bloom.
+ *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/system.h>
+#include <rtems/config.h>
+#include <rtems/score/scheduler.h>
+#include <rtems/score/schedulerpriority.h>
+#include <rtems/score/wkspace.h>
+
+void _Scheduler_priority_Free (
+  Thread_Control    *the_thread
+)
+{
+  _Workspace_Free( the_thread->scheduler_info );
+}

diff -u rtems/cpukit/score/src/schedulerpriorityschedule.c:1.3 rtems/cpukit/score/src/schedulerpriorityschedule.c:1.4
--- rtems/cpukit/score/src/schedulerpriorityschedule.c:1.3	Thu Feb 17 16:21:44 2011
+++ rtems/cpukit/score/src/schedulerpriorityschedule.c	Fri Feb 18 09:12:44 2011
@@ -1,5 +1,5 @@
 /*
- *  Scheduler Handler
+ *  Scheduler Handler / Scheduler
  *
  *  Copyright (C) 2010 Gedare Bloom.
  *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).

diff -u rtems/cpukit/score/src/schedulerpriorityunblock.c:1.3 rtems/cpukit/score/src/schedulerpriorityunblock.c:1.4
--- rtems/cpukit/score/src/schedulerpriorityunblock.c:1.3	Thu Feb 17 16:21:44 2011
+++ rtems/cpukit/score/src/schedulerpriorityunblock.c	Fri Feb 18 09:12:44 2011
@@ -23,5 +23,26 @@
   Thread_Control          *the_thread
 )
 {
-  _Scheduler_priority_Unblock_body(the_thread);
+  _Scheduler_priority_Ready_queue_enqueue(the_thread);
+
+  /* TODO: flash critical section? */
+
+  /*
+   *  If the thread that was unblocked is more important than the heir,
+   *  then we have a new heir.  This may or may not result in a
+   *  context switch.
+   *
+   *  Normal case:
+   *    If the current thread is preemptible, then we need to do
+   *    a context switch.
+   *  Pseudo-ISR case:
+   *    Even if the thread isn't preemptible, if the new heir is
+   *    a pseudo-ISR system task, we need to do a context switch.
+   */
+  if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
+    _Thread_Heir = the_thread;
+    if ( _Thread_Executing->is_preemptible ||
+        the_thread->current_priority == 0 )
+      _Thread_Dispatch_necessary = true;
+  }
 }

diff -u /dev/null rtems/cpukit/score/src/schedulerpriorityupdate.c:1.1
--- /dev/null	Fri Feb 18 10:10:31 2011
+++ rtems/cpukit/score/src/schedulerpriorityupdate.c	Fri Feb 18 09:12:44 2011
@@ -0,0 +1,43 @@
+/*
+ *  Scheduler Handler
+ *
+ *  Copyright (C) 2010 Gedare Bloom.
+ *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ *
+ *  $Id$
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/system.h>
+#include <rtems/config.h>
+#include <rtems/score/priority.h>
+#include <rtems/score/prioritybitmap.h>
+#include <rtems/score/scheduler.h>
+#include <rtems/score/schedulerpriority.h>
+#include <rtems/score/thread.h>
+
+void _Scheduler_priority_Update(
+  Thread_Control    *the_thread
+)
+{
+  Scheduler_priority_Per_thread *sched_info;
+  Chain_Control                 *rq;
+
+  sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
+  rq         = (Chain_Control *) _Scheduler.information;
+
+
+  sched_info->ready_chain = &rq[ the_thread->current_priority ];
+
+  _Priority_bit_map_Initialize_information( 
+    &sched_info->Priority_map, 
+    the_thread->current_priority 
+  );
+}

diff -u rtems/cpukit/score/src/schedulerpriorityyield.c:1.5 rtems/cpukit/score/src/schedulerpriorityyield.c:1.6
--- rtems/cpukit/score/src/schedulerpriorityyield.c:1.5	Thu Feb 17 16:21:44 2011
+++ rtems/cpukit/score/src/schedulerpriorityyield.c	Fri Feb 18 09:12:44 2011
@@ -1,7 +1,8 @@
 /*
- *  Scheduler Handler
+ *  Scheduler Priority Handler / Yield
  *
  *  Copyright (C) 2010 Gedare Bloom.
+ *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
@@ -15,19 +16,10 @@
 #endif
 
 #include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
 #include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
 #include <rtems/score/scheduler.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
+#include <rtems/score/schedulerpriority.h>
 #include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
 
 /*
  *  INTERRUPT LATENCY:
@@ -37,12 +29,14 @@
 
 void _Scheduler_priority_Yield(void)
 {
-  ISR_Level       level;
-  Thread_Control *executing;
-  Chain_Control  *ready;
-
-  executing = _Thread_Executing;
-  ready = executing->scheduler.priority->ready_chain;
+  Scheduler_priority_Per_thread *sched_info;
+  ISR_Level                      level;
+  Thread_Control                *executing;
+  Chain_Control                 *ready;
+
+  executing  = _Thread_Executing;
+  sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info;
+  ready      = sched_info->ready_chain;
   _ISR_Disable( level );
     if ( !_Chain_Has_only_one_node( ready ) ) {
       _Chain_Extract_unprotected( &executing->Object.Node );

diff -u rtems/cpukit/score/src/threadchangepriority.c:1.17 rtems/cpukit/score/src/threadchangepriority.c:1.18
--- rtems/cpukit/score/src/threadchangepriority.c:1.17	Thu Feb 17 16:21:44 2011
+++ rtems/cpukit/score/src/threadchangepriority.c	Fri Feb 18 09:12:44 2011
@@ -1,8 +1,7 @@
 /*
- *  Thread Handler
+ *  Thread Handler / Change Priority
  *
- *
- *  COPYRIGHT (c) 1989-2006.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -33,21 +32,6 @@
   States_Control state, original_state;
 
   /*
-   *  If this is a case where prepending the task to its priority is
-   *  potentially desired, then we need to consider whether to do it.
-   *  This usually occurs when a task lowers its priority implcitly as
-   *  the result of losing inherited priority.  Normal explicit priority
-   *  change calls (e.g. rtems_task_set_priority) should always do an
-   *  append not a prepend.
-   */
-/*
-  if ( prepend_it &&
-       _Thread_Is_executing( the_thread ) &&
-       new_priority >= the_thread->current_priority )
-    prepend_it = true;
-*/
-
-  /*
    * Save original state
    */
   original_state = the_thread->current_state;
@@ -91,16 +75,13 @@
      *  We now know the thread will be in the READY state when we remove
      *  the TRANSIENT state.  So we have to place it on the appropriate
      *  Ready Queue with interrupts off.
-     *
-     *  FIXME: hard-coded for priority scheduling. Might be ok since this 
-     *  function is specific to priority scheduling?
      */
     the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
 
     if ( prepend_it )
-      _Scheduler_priority_Ready_queue_enqueue_first( the_thread );
+      _Scheduler_Enqueue_first( the_thread );
     else
-      _Scheduler_priority_Ready_queue_enqueue( the_thread );
+      _Scheduler_Enqueue( the_thread );
   }
 
   _ISR_Flash( level );

diff -u rtems/cpukit/score/src/threadclose.c:1.16 rtems/cpukit/score/src/threadclose.c:1.17
--- rtems/cpukit/score/src/threadclose.c:1.16	Thu Feb 17 16:21:44 2011
+++ rtems/cpukit/score/src/threadclose.c	Fri Feb 18 09:12:44 2011
@@ -35,7 +35,6 @@
   Thread_Control       *the_thread
 )
 {
-
   /*
    *  Now we are in a dispatching critical section again and we
    *  can take the thread OUT of the published set.  It is invalid
@@ -78,7 +77,7 @@
   /*
    * Free the per-thread scheduling information.
    */
-  _Scheduler_Thread_scheduler_free( the_thread );
+  _Scheduler_Free( the_thread );
 
   /*
    *  The thread might have been FP.  So deal with that.

diff -u rtems/cpukit/score/src/threadinitialize.c:1.43 rtems/cpukit/score/src/threadinitialize.c:1.44
--- rtems/cpukit/score/src/threadinitialize.c:1.43	Thu Feb 17 16:21:44 2011
+++ rtems/cpukit/score/src/threadinitialize.c	Fri Feb 18 09:12:44 2011
@@ -193,7 +193,7 @@
   the_thread->resource_count          = 0;
   the_thread->real_priority           = priority;
   the_thread->Start.initial_priority  = priority;
-  sched =_Scheduler_Thread_scheduler_allocate( the_thread );
+  sched =_Scheduler_Allocate( the_thread );
   if ( !sched )
     goto failed;
   _Thread_Set_priority( the_thread, priority );

diff -u rtems/cpukit/score/src/threadsetpriority.c:1.8 rtems/cpukit/score/src/threadsetpriority.c:1.9
--- rtems/cpukit/score/src/threadsetpriority.c:1.8	Thu Feb 17 16:21:44 2011
+++ rtems/cpukit/score/src/threadsetpriority.c	Fri Feb 18 09:12:44 2011
@@ -16,19 +16,8 @@
 #endif
 
 #include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
 #include <rtems/score/scheduler.h>
-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
 #include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/userext.h>
-#include <rtems/score/wkspace.h>
 
 void _Thread_Set_priority(
   Thread_Control   *the_thread,
@@ -37,5 +26,5 @@
 {
   the_thread->current_priority = new_priority;
 
-  _Scheduler_Thread_scheduler_update( the_thread );
+  _Scheduler_Update( the_thread );
 }

diff -u rtems/cpukit/score/src/threadsettransient.c:1.8 rtems/cpukit/score/src/threadsettransient.c:1.9
--- rtems/cpukit/score/src/threadsettransient.c:1.8	Fri Jan 28 14:24:54 2011
+++ rtems/cpukit/score/src/threadsettransient.c	Fri Feb 18 09:12:44 2011
@@ -1,8 +1,7 @@
 /*
- *  Thread Handler
+ *  Thread Handler / Thread Set Transient
  *
- *
- *  COPYRIGHT (c) 1989-1999.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -32,24 +31,10 @@
 #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
 
-/*PAGE
- *
- *  _Thread_Set_transient
- *
- *  This kernel routine places the requested thread in the transient state
- *  which will remove it from the ready queue, if necessary.  No
- *  rescheduling is necessary because it is assumed that the transient
- *  state will be cleared before dispatching is enabled.
- *
- *  Input parameters:
- *    the_thread - pointer to thread control block
- *
- *  Output parameters:  NONE
- *
+/*
  *  INTERRUPT LATENCY:
  *    only case
  */
-
 void _Thread_Set_transient(
   Thread_Control *the_thread
 )
@@ -62,9 +47,8 @@
   old_state = the_thread->current_state;
   the_thread->current_state = _States_Set( STATES_TRANSIENT, old_state );
 
-  /* FIXME: need to check which scheduler to use? */
   if ( _States_Is_ready( old_state ) ) {
-    _Scheduler_priority_Ready_queue_extract( the_thread);
+    _Scheduler_Extract( the_thread );
   }
 
   _ISR_Enable( level );


 *joel*:
2011-02-18	Joel Sherrill <joel.sherrill at oarcorp.com>

	* tm26/task1.c, tm27/task1.c: Adjust for name changes.

M   1.95  testsuites/tmtests/ChangeLog
M   1.35  testsuites/tmtests/tm26/task1.c
M   1.32  testsuites/tmtests/tm27/task1.c

diff -u rtems/testsuites/tmtests/ChangeLog:1.94 rtems/testsuites/tmtests/ChangeLog:1.95
--- rtems/testsuites/tmtests/ChangeLog:1.94	Wed Feb  2 09:01:32 2011
+++ rtems/testsuites/tmtests/ChangeLog	Fri Feb 18 09:12:55 2011
@@ -1,3 +1,7 @@
+2011-02-18	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	* tm26/task1.c, tm27/task1.c: Adjust for name changes.
+
 2011-02-02	Ralf Corsépius <ralf.corsepius at rtems.org>
 
 	* configure.ac: Require autoconf-2.68, automake-1.11.1.

diff -u rtems/testsuites/tmtests/tm26/task1.c:1.34 rtems/testsuites/tmtests/tm26/task1.c:1.35
--- rtems/testsuites/tmtests/tm26/task1.c:1.34	Thu Nov 25 07:26:45 2010
+++ rtems/testsuites/tmtests/tm26/task1.c	Fri Feb 18 09:12:55 2011
@@ -1,5 +1,5 @@
 /*
- *  COPYRIGHT (c) 1989-2009.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -235,15 +235,17 @@
   rtems_task_argument argument
 )
 {
+  Chain_Control   *ready_queues;
+
   thread_dispatch_no_fp_time = benchmark_timer_read();
 
   _Thread_Set_state( _Thread_Executing, STATES_SUSPENDED );
 
   Middle_tcb   = _Thread_Executing;
 
+  ready_queues      = (Chain_Control *) _Scheduler.information;
   _Thread_Executing =
-        (Thread_Control *) 
-        _Chain_First(&_Scheduler.Ready_queues.priority[LOW_PRIORITY]);
+        (Thread_Control *) _Chain_First(&ready_queues[LOW_PRIORITY]);
 
   /* do not force context switch */
 
@@ -263,6 +265,9 @@
 )
 {
   Thread_Control *executing;
+  Chain_Control  *ready_queues;
+
+  ready_queues      = (Chain_Control *) _Scheduler.information;
 
   context_switch_no_fp_time = benchmark_timer_read();
 
@@ -280,8 +285,7 @@
   context_switch_another_task_time = benchmark_timer_read();
 
   _Thread_Executing =
-        (Thread_Control *) 
-        _Chain_First(&_Scheduler.Ready_queues.priority[FP1_PRIORITY]);
+        (Thread_Control *) _Chain_First(&ready_queues[FP1_PRIORITY]);
 
   /* do not force context switch */
 
@@ -300,16 +304,17 @@
   rtems_task_argument argument
 )
 {
-  Thread_Control *executing;
+  Chain_Control   *ready_queues;
+  Thread_Control  *executing;
   FP_DECLARE;
 
   context_switch_restore_1st_fp_time = benchmark_timer_read();
 
   executing = _Thread_Executing;
 
+  ready_queues      = (Chain_Control *) _Scheduler.information;
   _Thread_Executing =
-        (Thread_Control *) 
-        _Chain_First(&_Scheduler.Ready_queues.priority[FP2_PRIORITY]);
+        (Thread_Control *) _Chain_First(&ready_queues[FP2_PRIORITY]);
 
   /* do not force context switch */
 
@@ -331,9 +336,9 @@
 
   executing = _Thread_Executing;
 
+  ready_queues      = (Chain_Control *) _Scheduler.information;
   _Thread_Executing =
-       (Thread_Control *)
-       _Chain_First(&_Scheduler.Ready_queues.priority[FP2_PRIORITY]);
+        (Thread_Control *) _Chain_First(&ready_queues[FP2_PRIORITY]);
 
   /* do not force context switch */
 
@@ -354,6 +359,7 @@
   rtems_task_argument argument
 )
 {
+  Chain_Control  *ready_queues;
   Thread_Control *executing;
   FP_DECLARE;
 
@@ -361,9 +367,9 @@
 
   executing = _Thread_Executing;
 
+  ready_queues      = (Chain_Control *) _Scheduler.information;
   _Thread_Executing =
-       (Thread_Control *)
-       _Chain_First(&_Scheduler.Ready_queues.priority[FP1_PRIORITY]);
+        (Thread_Control *) _Chain_First(&ready_queues[FP1_PRIORITY]);
 
   FP_LOAD( 1.0 );
 

diff -u rtems/testsuites/tmtests/tm27/task1.c:1.31 rtems/testsuites/tmtests/tm27/task1.c:1.32
--- rtems/testsuites/tmtests/tm27/task1.c:1.31	Thu Nov 25 07:26:45 2010
+++ rtems/testsuites/tmtests/tm27/task1.c	Fri Feb 18 09:12:55 2011
@@ -1,5 +1,5 @@
 /*
- *  COPYRIGHT (c) 1989-2009.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -91,6 +91,8 @@
   rtems_task_argument argument
 )
 {
+  Chain_Control   *ready_queues;
+
   Install_tm27_vector( Isr_handler );
 
   /*
@@ -170,8 +172,9 @@
 
   _Thread_Dispatch_disable_level = 0;
 
-  _Thread_Heir = (rtems_tcb *) 
-        _Chain_Last(&_Scheduler.Ready_queues.priority[LOW_PRIORITY]);
+  ready_queues      = (Chain_Control *) _Scheduler.information;
+  _Thread_Executing =
+        (Thread_Control *) _Chain_First(&ready_queues[LOW_PRIORITY]);
 
   _Thread_Dispatch_necessary = 1;
 
@@ -199,6 +202,8 @@
   rtems_task_argument argument
 )
 {
+  Chain_Control   *ready_queues;
+
 #if (MUST_WAIT_FOR_INTERRUPT == 1)
   while ( Interrupt_occurred == 0 );
 #endif
@@ -228,8 +233,9 @@
 
   _Thread_Dispatch_disable_level = 0;
 
-  _Thread_Heir = (rtems_tcb *)
-      _Chain_First(&_Scheduler.Ready_queues.priority[LOW_PRIORITY]);
+  ready_queues      = (Chain_Control *) _Scheduler.information;
+  _Thread_Executing =
+        (Thread_Control *) _Chain_First(&ready_queues[LOW_PRIORITY]);
 
   _Thread_Dispatch_necessary = 1;
 



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110218/798e7011/attachment.html>


More information about the vc mailing list