change log for rtems (2011-02-17)

rtems-vc at rtems.org rtems-vc at rtems.org
Thu Feb 17 23:10:59 UTC 2011


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

	* sapi/include/confdefs.h, sapi/include/rtems/config.h,
	score/include/rtems/score/scheduler.h,
	score/include/rtems/score/schedulerpriority.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/schedulerprioritythreadschedulerallocate.c,
	score/src/schedulerprioritythreadschedulerfree.c,
	score/src/schedulerprioritythreadschedulerupdate.c,
	score/src/schedulerpriorityunblock.c,
	score/src/schedulerpriorityyield.c, score/src/threadchangepriority.c,
	score/src/threadclearstate.c, score/src/threadclose.c,
	score/src/threadinitialize.c, score/src/threadready.c,
	score/src/threadresume.c, score/src/threadsetpriority.c,
	score/src/threadsetstate.c, score/src/threadsuspend.c: Simplify the
	pluggable scheduler interface. Its configuration made a table
	of available schedulers and set a pointer to one of the.
	This was heavy handed since you can only use one scheduler
	in an application. This configuration mechanism resulted in a
	scheduler pointer being passed around when you could put all
	scheduler configuration in an initialized structure.

M 1.2718  cpukit/ChangeLog
M  1.155  cpukit/sapi/include/confdefs.h
M   1.55  cpukit/sapi/include/rtems/config.h
M    1.4  cpukit/score/include/rtems/score/scheduler.h
M    1.3  cpukit/score/include/rtems/score/schedulerpriority.h
M    1.3  cpukit/score/inline/rtems/score/scheduler.inl
M    1.4  cpukit/score/inline/rtems/score/schedulerpriority.inl
M    1.2  cpukit/score/src/scheduler.c
M    1.3  cpukit/score/src/schedulerpriority.c
M    1.3  cpukit/score/src/schedulerpriorityblock.c
M    1.3  cpukit/score/src/schedulerpriorityschedule.c
M    1.3  cpukit/score/src/schedulerprioritythreadschedulerallocate.c
M    1.3  cpukit/score/src/schedulerprioritythreadschedulerfree.c
M    1.3  cpukit/score/src/schedulerprioritythreadschedulerupdate.c
M    1.3  cpukit/score/src/schedulerpriorityunblock.c
M    1.5  cpukit/score/src/schedulerpriorityyield.c
M   1.17  cpukit/score/src/threadchangepriority.c
M   1.15  cpukit/score/src/threadclearstate.c
M   1.16  cpukit/score/src/threadclose.c
M   1.43  cpukit/score/src/threadinitialize.c
M   1.12  cpukit/score/src/threadready.c
M   1.15  cpukit/score/src/threadresume.c
M    1.8  cpukit/score/src/threadsetpriority.c
M   1.11  cpukit/score/src/threadsetstate.c
M   1.12  cpukit/score/src/threadsuspend.c

diff -u rtems/cpukit/ChangeLog:1.2717 rtems/cpukit/ChangeLog:1.2718
--- rtems/cpukit/ChangeLog:1.2717	Thu Feb 17 13:24:19 2011
+++ rtems/cpukit/ChangeLog	Thu Feb 17 16:21:43 2011
@@ -1,5 +1,31 @@
 2011-02-17	Joel Sherrill <joel.sherrill at oarcorp.com>
 
+	* sapi/include/confdefs.h, sapi/include/rtems/config.h,
+	score/include/rtems/score/scheduler.h,
+	score/include/rtems/score/schedulerpriority.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/schedulerprioritythreadschedulerallocate.c,
+	score/src/schedulerprioritythreadschedulerfree.c,
+	score/src/schedulerprioritythreadschedulerupdate.c,
+	score/src/schedulerpriorityunblock.c,
+	score/src/schedulerpriorityyield.c, score/src/threadchangepriority.c,
+	score/src/threadclearstate.c, score/src/threadclose.c,
+	score/src/threadinitialize.c, score/src/threadready.c,
+	score/src/threadresume.c, score/src/threadsetpriority.c,
+	score/src/threadsetstate.c, score/src/threadsuspend.c: Simplify the
+	pluggable scheduler interface. Its configuration made a table
+	of available schedulers and set a pointer to one of the.
+	This was heavy handed since you can only use one scheduler
+	in an application. This configuration mechanism resulted in a
+	scheduler pointer being passed around when you could put all
+	scheduler configuration in an initialized structure.
+
+2011-02-17	Joel Sherrill <joel.sherrill at oarcorp.com>
+
 	* libmisc/Makefile.am, libmisc/fb/mw_uid.c, libmisc/fb/mw_uid.h: Clean
 	up. Add Doxygen style comments. Add method to print uid structure.
 	* libmisc/fb/mw_print.c: New file.

diff -u rtems/cpukit/sapi/include/confdefs.h:1.154 rtems/cpukit/sapi/include/confdefs.h:1.155
--- rtems/cpukit/sapi/include/confdefs.h:1.154	Wed Feb  9 00:18:57 2011
+++ rtems/cpukit/sapi/include/confdefs.h	Thu Feb 17 16:21:44 2011
@@ -26,7 +26,7 @@
  */
 
 /*
- *  COPYRIGHT (c) 1989-2010.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -521,6 +521,9 @@
  *  This configures the maximum priority value that
  *  a task may have.
  *
+ *  The following applies to the data space requirements
+ *  of the Priority Scheduler.
+ *
  *  By reducing the number of priorities in a system,
  *  the amount of RAM required by RTEMS can be significantly
  *  reduced.  RTEMS allocates a Chain_Control structure per
@@ -540,8 +543,7 @@
  *    + 127, 125 application priorities, 1536 bytes saved
  *    + 255, 253 application priorities, 0 bytes saved
  *
- *  It is specified in terms of Classic API
- *  priority values.
+ *  It is specified in terms of Classic API priority values.
  */
 #ifndef CONFIGURE_MAXIMUM_PRIORITY
   #define CONFIGURE_MAXIMUM_PRIORITY PRIORITY_DEFAULT_MAXIMUM
@@ -552,111 +554,60 @@
  *
  * The scheduler configuration allows an application to select the 
  * scheduling policy to use.  The supported configurations are:
- *  CONFIGURE_SCHEDULER_USER
- *  CONFIGURE_SCHEDULER_PRIORITY
+ *  CONFIGURE_SCHEDULER_USER     - user provided scheduler
+ *  CONFIGURE_SCHEDULER_PRIORITY - Deterministic Priority Scheduler
  * 
  * If no configuration is specified by the application, then 
  * CONFIGURE_SCHEDULER_PRIORITY is assumed to be the default.
  *
  * An application can define its own scheduling policy by defining
- * CONFIGURE_SCHEDULER_USER and CONFIGURE_SCHEDULER_ENTRY_USER to point
- * to an initialization routine.  Note: CONFIGURE_SCHEDULER_USER is not 
- * fully supported, since it has no per-thread field.
- *
- * To add a new scheduler:
+ * CONFIGURE_SCHEDULER_USER and the following:
+ *    - CONFIGURE_SCHEDULER_ENTRY_POINTS 
+ *    - CONFIGURE_MEMORY_FOR_SCHEDULER - base memory
+ *    - CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER - per task memory
  */
 #include <rtems/score/scheduler.h>
 
 #if defined(CONFIGURE_SCHEDULER_USER) && \
-    !defined(CONFIGURE_SCHEDULER_ENTRY_USER)
-  #error "CONFIGURE_ERROR: CONFIGURE_SCHEDULER_USER without CONFIGURE_SCHEDULER_ENTRY_USER"
-#endif
-
-/* enable all RTEMS-provided schedulers */
-#if defined(CONFIGURE_SCHEDULER_ALL)
-  #define CONFIGURE_SCHEDULER_PRIORITY
+    !defined(CONFIGURE_SCHEDULER_USER_ENTRY_POINTS)
+  #error "CONFIGURE_ERROR: CONFIGURE_SCHEDULER_USER requires CONFIGURE_SCHEDULER_USER_ENTRY_POINTS"
 #endif
 
 /* If no scheduler is specified, the priority scheduler is default. */
 #if !defined(CONFIGURE_SCHEDULER_USER) && \
     !defined(CONFIGURE_SCHEDULER_PRIORITY)
   #define CONFIGURE_SCHEDULER_PRIORITY
-  #define CONFIGURE_SCHEDULER_POLICY _Scheduler_PRIORITY
-#endif
-
-/*
- * If a user scheduler is specified and no policy is set, 
- * the user scheduler is the default policy.
- */
-#if defined(CONFIGURE_SCHEDULER_USER) && \
-    !defined(CONFIGURE_SCHEDULER_POLICY)
-  #define CONFIGURE_SCHEDULER_POLICY _Scheduler_USER
 #endif
 
 /* 
- * Check for priority scheduler next, as it is the default policy if there
- * is no CONFIGURE_SCHEDULER_POLICY set and no USER scheduler provided.
+ * Is the Priority Scheduler is selected, then configure for it.
  */
 #if defined(CONFIGURE_SCHEDULER_PRIORITY)
   #include <rtems/score/schedulerpriority.h>
-  #define CONFIGURE_SCHEDULER_ENTRY_PRIORITY { _Scheduler_priority_Initialize }
-  #if !defined(CONFIGURE_SCHEDULER_POLICY)
-    #define CONFIGURE_SCHEDULER_POLICY _Scheduler_PRIORITY
-  #endif
+  #define SCHEDULER_ENTRY_POINTS SCHEDULER_PRIORITY_ENTRY_POINTS
 
   /**
    * define the memory used by the priority scheduler
    */
-  #define CONFIGURE_MEMORY_SCHEDULER_PRIORITY ( \
+  #define CONFIGURE_MEMORY_FOR_SCHEDULER ( \
     _Configure_From_workspace( \
       ((CONFIGURE_MAXIMUM_PRIORITY+1) * sizeof(Chain_Control)) ) \
   )
-  #define CONFIGURE_MEMORY_PER_TASK_SCHEDULER_PRIORITY ( \
+  #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER ( \
     _Configure_From_workspace(sizeof(Scheduler_priority_Per_thread)) )
 #endif
 
 /* 
- * Set up the scheduler table.  The scheduling code indexes this table to 
- * invoke the correct scheduling implementation. The scheduler to use is 
- * determined by the Configuration.scheduler_policy field, which is set
- * by CONFIGURE_SCHEDULER_POLICY.  If a particular scheduler is not enabled,
- * an empty entry is included in its entry in the scheduler table.
+ * Set up the scheduler entry points table.  The scheduling code uses
+ * this code to know which scheduler is configured by the user.
  */
-
-  /**
-   * An empty scheduler entry
-   */
-  #define CONFIGURE_SCHEDULER_NULL { NULL }
-
 #ifdef CONFIGURE_INIT
-  /* the table of available schedulers. */
-  const Scheduler_Table_entry _Scheduler_Table[] = {
-    #if defined(CONFIGURE_SCHEDULER_USER) && \
-        defined(CONFIGURE_SCHEDULER_ENTRY_USER)
-      CONFIGURE_SCHEDULER_ENTRY_USER,
-    #else
-      CONFIGURE_SCHEDULER_NULL,
-    #endif
-    #if defined(CONFIGURE_SCHEDULER_PRIORITY) && \
-        defined(CONFIGURE_SCHEDULER_ENTRY_PRIORITY)
-      CONFIGURE_SCHEDULER_ENTRY_PRIORITY,
-    #else
-      CONFIGURE_SCHEDULER_NULL,
-    #endif
+  Scheduler_Control  _Scheduler = {
+    .Ready_queues.priority = NULL,
+    .Operations            = SCHEDULER_ENTRY_POINTS
   };
 #endif
 
-/**
- * Define the memory overhead for the scheduler
- */
-#define CONFIGURE_MEMORY_FOR_SCHEDULER ( \
-    CONFIGURE_MEMORY_SCHEDULER_PRIORITY \
-  )
-
-#define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER ( \
-    CONFIGURE_MEMORY_PER_TASK_SCHEDULER_PRIORITY \
-  )
-
 /*
  *  If you said the IDLE task was going to do application initialization
  *  and didn't override the IDLE body, then something is amiss.
@@ -2129,7 +2080,6 @@
     CONFIGURE_MAXIMUM_USER_EXTENSIONS,        /* maximum dynamic extensions */
     CONFIGURE_MICROSECONDS_PER_TICK,          /* microseconds per clock tick */
     CONFIGURE_TICKS_PER_TIMESLICE,            /* ticks per timeslice quantum */
-    CONFIGURE_SCHEDULER_POLICY,               /* scheduling policy */
     CONFIGURE_IDLE_TASK_BODY,                 /* user's IDLE task */
     CONFIGURE_IDLE_TASK_STACK_SIZE,           /* IDLE task stack size */
     CONFIGURE_INTERRUPT_STACK_SIZE,           /* interrupt stack size */

diff -u rtems/cpukit/sapi/include/rtems/config.h:1.54 rtems/cpukit/sapi/include/rtems/config.h:1.55
--- rtems/cpukit/sapi/include/rtems/config.h:1.54	Wed Nov 24 09:51:27 2010
+++ rtems/cpukit/sapi/include/rtems/config.h	Thu Feb 17 16:21:44 2011
@@ -6,7 +6,7 @@
  *  This include file contains the table of user defined configuration
  *  parameters.
  *
- *  COPYRIGHT (c) 1989-2008.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -118,10 +118,6 @@
    */
   uint32_t                       ticks_per_timeslice;
 
-  /** This field specifies the scheduling policy to use.
-   */
-  uint32_t                       scheduler_policy;
-
   /** This element points to the BSP's optional idle task which may override
    *  the default one provided with RTEMS.
    */

diff -u rtems/cpukit/score/include/rtems/score/scheduler.h:1.3 rtems/cpukit/score/include/rtems/score/scheduler.h:1.4
--- rtems/cpukit/score/include/rtems/score/scheduler.h:1.3	Thu Nov 25 07:24:25 2010
+++ rtems/cpukit/score/include/rtems/score/scheduler.h	Thu Feb 17 16:21:44 2011
@@ -7,6 +7,7 @@
 
 /*
  *  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
@@ -35,15 +36,6 @@
  */
 /**@{*/
 
-/*
- * These defines are used to set the scheduler_policy value. The values
- * must correspond directly with the order of the fields in the scheduler
- * table (Scheduler_Table_entry), because the Configuration.scheduler_policy
- * field is used to index the scheduler table.
- */
-#define _Scheduler_USER     (0)
-#define _Scheduler_PRIORITY (1)
-
 typedef struct Scheduler_Control_struct Scheduler_Control;
 
 /*
@@ -54,9 +46,6 @@
   void ( *scheduler_init )( Scheduler_Control * );
 } Scheduler_Table_entry;
 
-/* instantiated and initialized in confdefs.h */
-extern const Scheduler_Table_entry _Scheduler_Table[];
-
 /**
  * The following Scheduler_Per_thread_xxx structures are used to
  * hold per-thread data used by the scheduler.  Thread_Control->scheduler is a
@@ -82,26 +71,29 @@
  */
 typedef struct {
   /** Implements the scheduling decision logic (policy). */
-  void ( *schedule ) ( Scheduler_Control * );
+  void ( *initialize )(void);
+
+  /** Implements the scheduling decision logic (policy). */
+  void ( *schedule )(void);
 
   /** Voluntarily yields the processor per the scheduling policy. */
-  void ( *yield ) ( Scheduler_Control * );
+  void ( *yield )(void);
 
   /** Removes the given thread from scheduling decisions. */
-  void ( *block ) ( Scheduler_Control *, Thread_Control * );
+  void ( *block )(Thread_Control *);
 
   /** Adds the given thread to scheduling decisions. */
-  void ( *unblock ) ( Scheduler_Control *, Thread_Control * );
+  void ( *unblock )(Thread_Control *);
 
   /** allocates the scheduler field of the given thread */
-  void * ( *scheduler_allocate ) ( Scheduler_Control *, Thread_Control * );
+  void * ( *scheduler_allocate )(Thread_Control *);
 
   /** frees the scheduler field of the given thread */
-  void ( *scheduler_free ) ( Scheduler_Control *, Thread_Control * );
+  void ( *scheduler_free )(Thread_Control *);
 
   /** updates the scheduler field of the given thread -- primarily used
    * when changing the thread's priority. */
-  void ( *scheduler_update ) ( Scheduler_Control *, Thread_Control * );
+  void ( *scheduler_update )(Thread_Control *);
 } Scheduler_Operations;
 
 /**
@@ -123,7 +115,7 @@
   } Ready_queues;
 
   /** The jump table for scheduler-specific functions */
-  Scheduler_Operations                  Operations;
+  Scheduler_Operations        Operations;
 };
 
 /**
@@ -131,8 +123,10 @@
  *  scheduler.
  *
  * @note Can we make this per-cpu? then _Scheduler will be a macro.
+ *
+ * @note This is instantiated and initialized in confdefs.h.
  */
-SCORE_EXTERN Scheduler_Control          _Scheduler;
+extern Scheduler_Control  _Scheduler;
 
 /**
  *  This routine initializes the scheduler to the policy chosen by the user

diff -u rtems/cpukit/score/include/rtems/score/schedulerpriority.h:1.2 rtems/cpukit/score/include/rtems/score/schedulerpriority.h:1.3
--- rtems/cpukit/score/include/rtems/score/schedulerpriority.h:1.2	Thu Nov 25 06:42:50 2010
+++ rtems/cpukit/score/include/rtems/score/schedulerpriority.h	Thu Feb 17 16:21:44 2011
@@ -7,6 +7,7 @@
 
 /*
  *  Copryight (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
@@ -35,11 +36,24 @@
 /**@{*/
 
 /**
+ *  Entry points for Scheduler Priority
+ */
+#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 \
+  }
+
+/**
  * This routine initializes the priority scheduler.
  */
-void _Scheduler_priority_Initialize(
-    Scheduler_Control    *the_scheduler
-);
+void _Scheduler_priority_Initialize(void);
 
 /**
  *  This routine removes @a the_thread from the scheduling decision, 
@@ -48,32 +62,27 @@
  *  a new heir thread.
  */
 void _Scheduler_priority_Block( 
-    Scheduler_Control *the_scheduler,
-    Thread_Control    *the_thread 
+  Thread_Control    *the_thread 
 );
 
 /**
  *  This kernel routine sets the heir thread to be the next ready thread 
  *  by invoking the_scheduler->ready_queue->operations->first().
  */
-void _Scheduler_priority_Schedule(
-    Scheduler_Control *the_scheduler
-);
+void _Scheduler_priority_Schedule(void);
 
 /**
  * This routine allocates @a the_thread->scheduler.
  */
 void * _Scheduler_priority_Thread_scheduler_allocate(
-    Scheduler_Control   *the_scheduler,
-    Thread_Control      *the_thread
+  Thread_Control      *the_thread
 );
 
 /**
  * This routine frees @a the_thread->scheduler.
  */
 void _Scheduler_priority_Thread_scheduler_free(
-    Scheduler_Control   *the_scheduler,
-    Thread_Control      *the_thread
+  Thread_Control      *the_thread
 );
 
 /**
@@ -81,8 +90,7 @@
  * structures and thread state
  */
 void _Scheduler_priority_Thread_scheduler_update(
-    Scheduler_Control   *the_scheduler,
-    Thread_Control      *the_thread
+  Thread_Control      *the_thread
 );
 
 /**
@@ -91,17 +99,21 @@
  *  updates any appropriate scheduling variables, for example the heir thread.
  */
 void _Scheduler_priority_Unblock(
-    Scheduler_Control *the_scheduler,
-    Thread_Control    *the_thread 
+  Thread_Control    *the_thread 
 );
 
 /**
  *  This routine is invoked when a thread wishes to voluntarily
  *  transfer control of the processor to another thread in the queue.
+ *
+ *  This routine will remove the running THREAD from the ready queue
+ *  and place it immediately at the rear of this chain.  Reset timeslice
+ *  and yield the processor functions both use this routine, therefore if
+ *  reset is true and this is the only thread on the queue then the
+ *  timeslice counter is reset.  The heir THREAD will be updated if the
+ *  running is also the currently the heir.
  */
-void _Scheduler_priority_Yield(
-    Scheduler_Control *the_scheduler
-);
+void _Scheduler_priority_Yield( void );
 
 #ifndef __RTEMS_APPLICATION__
 #include <rtems/score/schedulerpriority.inl>

diff -u rtems/cpukit/score/inline/rtems/score/scheduler.inl:1.2 rtems/cpukit/score/inline/rtems/score/scheduler.inl:1.3
--- rtems/cpukit/score/inline/rtems/score/scheduler.inl:1.2	Thu Nov 25 07:24:25 2010
+++ rtems/cpukit/score/inline/rtems/score/scheduler.inl	Thu Feb 17 16:21:44 2011
@@ -7,6 +7,7 @@
 
 /*
  *  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
@@ -45,13 +46,11 @@
 /** @brief _Scheduler_Schedule
  *
  *  This kernel routine implements the scheduling decision logic for 
- *  @a the_scheduler. It does NOT dispatch.
+ *  the scheduler. It does NOT dispatch.
  */
-RTEMS_INLINE_ROUTINE void _Scheduler_Schedule(
-    Scheduler_Control *the_scheduler 
-)
+RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
 {
-  the_scheduler->Operations.schedule( the_scheduler );
+  _Scheduler.Operations.schedule();
 }
 
 /** @brief _Scheduler_Yield
@@ -63,37 +62,35 @@
  */
 RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
 {
-  _Scheduler.Operations.yield( &_Scheduler );
+  _Scheduler.Operations.yield();
 }
 
 /** @brief _Scheduler_Block
  *
  *  This routine removes @a the_thread from the scheduling decision for 
- *  @a the_scheduler. The primary task is to remove the thread from the 
+ *  the scheduler. The primary task is to remove the thread from the 
  *  ready queue.  It performs any necessary schedulering operations 
  *  including the selection of a new heir thread.
  */
 RTEMS_INLINE_ROUTINE void _Scheduler_Block( 
-    Scheduler_Control *the_scheduler,
     Thread_Control    *the_thread 
 )
 {
-  the_scheduler->Operations.block( the_scheduler, the_thread );
+  _Scheduler.Operations.block( the_thread );
 }
 
 /** @brief _Scheduler_Unblock
  *
  *  This routine adds @a the_thread to the scheduling decision for 
- *  @a the_scheduler.  The primary task is to add the thread to the
+ *  the scheduler.  The primary task is to add the thread to the
  *  ready queue per the schedulering policy and update any appropriate 
  *  scheduling variables, for example the heir thread.
  */
 RTEMS_INLINE_ROUTINE void _Scheduler_Unblock(
-    Scheduler_Control *the_scheduler,
     Thread_Control    *the_thread 
 )
 {
-  the_scheduler->Operations.unblock( the_scheduler, the_thread );
+  _Scheduler.Operations.unblock( the_thread );
 }
 
 /** @brief _Scheduler_Thread_scheduler_allocate
@@ -101,12 +98,10 @@
  * This routine allocates @a the_thread->scheduler
  */
 RTEMS_INLINE_ROUTINE void* _Scheduler_Thread_scheduler_allocate( 
-  Scheduler_Control *the_scheduler,
   Thread_Control    *the_thread
 )
 {
-  return 
-    the_scheduler->Operations.scheduler_allocate( the_scheduler, the_thread );
+  return _Scheduler.Operations.scheduler_allocate( the_thread );
 }
 
 /** @brief _Scheduler_Thread_scheduler_free
@@ -114,11 +109,10 @@
  * This routine frees @a the_thread->scheduler
  */
 RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_free( 
-  Scheduler_Control *the_scheduler,
   Thread_Control    *the_thread
 )
 {
-  return the_scheduler->Operations.scheduler_free( the_scheduler, the_thread );
+  return _Scheduler.Operations.scheduler_free( the_thread );
 }
 
 /** @brief _Scheduler_Thread_scheduler_update
@@ -126,11 +120,10 @@
  * This routine updates @a the_thread->scheduler
  */
 RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_update( 
-  Scheduler_Control *the_scheduler,
   Thread_Control    *the_thread
 )
 {
-  the_scheduler->Operations.scheduler_update( the_scheduler, the_thread );
+  _Scheduler.Operations.scheduler_update( the_thread );
 }
 
 /**@}*/

diff -u rtems/cpukit/score/inline/rtems/score/schedulerpriority.inl:1.3 rtems/cpukit/score/inline/rtems/score/schedulerpriority.inl:1.4
--- rtems/cpukit/score/inline/rtems/score/schedulerpriority.inl:1.3	Thu Nov 25 07:24:26 2010
+++ rtems/cpukit/score/inline/rtems/score/schedulerpriority.inl	Thu Feb 17 16:21:44 2011
@@ -7,6 +7,7 @@
 
 /*
  *  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
@@ -31,35 +32,28 @@
  *
  *  This routine initializes @a the_ready_queue for priority-based scheduling.
  */
-RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_initialize(
-  Scheduler_Control         *the_scheduler
-) {
+RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_initialize(void)
+{
   size_t index;
 
   /* allocate ready queue structures */
-  the_scheduler->Ready_queues.priority = (Chain_Control *) 
+  _Scheduler.Ready_queues.priority = (Chain_Control *) 
     _Workspace_Allocate_or_fatal_error(
       ((size_t) PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
     );
 
   /* initialize ready queue structures */
   for( index=0; index <= PRIORITY_MAXIMUM; index++)
-    _Chain_Initialize_empty( &the_scheduler->Ready_queues.priority[index] );
+    _Chain_Initialize_empty( &_Scheduler.Ready_queues.priority[index] );
 }
 
-/* 
- *  _Scheduler_priority_Ready_queue_enqueue
+/**
+ *  @brief _Scheduler_priority_Ready_queue_enqueue
  *
  *  This routine puts @a the_thread on to the priority-based ready queue.
  *  
- *  Input parameters:
- *    the_thread  - pointer to thread
- *
- *  Output parameters: NONE
- *
- *  INTERRUPT LATENCY:
+ *  @param[in] the_thread  - pointer to thread
  */
-
 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue(
   Thread_Control                  *the_thread
 )
@@ -70,21 +64,15 @@
       &the_thread->Object.Node );
 }
 
-/*
- *  _Scheduler_priority_Ready_queue_Enqueue_first
+/**
+ *  @brief _Scheduler_priority_Ready_queue_Enqueue_first
  *
  *  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.
  *  
- *  Input parameters:
- *    the_thread      - pointer to thread
- *
- *  Output parameters: NONE
- *
- *  INTERRUPT LATENCY:
+ *  @param[in] the_thread  - pointer to thread
  */
-
 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue_first(
   Thread_Control                   *the_thread
 )
@@ -95,20 +83,14 @@
       &the_thread->Object.Node );
 }
 
-/*
- *  _Scheduler_priority_Ready_queue_extract
+/**
+ *  @brief _Scheduler_priority_Ready_queue_extract
  *
  *  This routine removes a specific thread from the specified 
  *  priority-based ready queue.
  *
- *  Input parameters:
- *    the_thread       - pointer to a thread control block
- *
- *  Output parameters: NONE
- *
- *  INTERRUPT LATENCY: NONE
+ *  @param[in] the_thread  - pointer to thread
  */
-
 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_extract(
   Thread_Control        *the_thread
 )
@@ -122,18 +104,15 @@
     _Chain_Extract_unprotected( &the_thread->Object.Node );
 }
 
-/*
- *  _Scheduler_priority_Ready_queue_first
+/**
+ *  @brief _Scheduler_priority_Ready_queue_first
  *
  *  This routines returns a pointer to the first thread on @a the_ready_queue.
  *
- *  Input parameters:
- *    the_ready_queue - pointer to thread queue
+ *  @param[in] the_ready_queue - pointer to thread queue
  *
- *  Output parameters:
- *    returns - first thread or NULL
+ *  @return This method returns the first thread or NULL
  */
-
 RTEMS_INLINE_ROUTINE Thread_Control *_Scheduler_priority_Ready_queue_first(
   Chain_Control       *the_ready_queue
 )
@@ -146,20 +125,14 @@
   return NULL;
 }
 
-/*
- *  _Scheduler_priority_Ready_queue_requeue
+/**
+ *  @brief _Scheduler_priority_Ready_queue_requeue
  *
  *  This routine is invoked when a thread changes priority and should be
  *  moved to a different position on the ready queue.
  *
- *  Input parameters:
- *    the_thread        - pointer to a thread control block
- *
- *  Output parameters: NONE
- *
- *  INTERRUPT LATENCY: NONE
+ *  @param[in] the_thread  - pointer to thread
  */
-
 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_requeue(
   Thread_Control            *the_thread
 )
@@ -174,47 +147,30 @@
   }
 }
 
-/*
- * _Scheduler_priority_Schedule_body
- *
- * This kernel routine implements scheduling decision logic for priority-based
- * scheduling.  
- *
- * Input parameters:
- *   the_scheduler  - pointer to scheduler control
- *   the_thread     - pointer to thread control block
+/**
+ *  @brief _Scheduler_priority_Schedule_body
  *
- * Output parameters:  NONE
+ *  This kernel routine implements scheduling decision logic
+ *  for priority-based scheduling.  
  *
- *  INTERRUPT LATENCY:
+ *  @param[in] the_thread  - pointer to thread
  */
-
-RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(
-  Scheduler_Control     *the_scheduler
-)
+RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
 {
   _Thread_Heir = _Scheduler_priority_Ready_queue_first(
-      the_scheduler->Ready_queues.priority
+      _Scheduler.Ready_queues.priority
   );
 }
 
-/*
- * _Scheduler_priority_Block_body
+/**
+ *  @brief _Scheduler_priority_Block_body
  *
- * This kernel routine removes the_thread from scheduling decisions based 
+ *  This kernel routine removes the_thread from scheduling decisions based 
  * on simple queue extraction.
  *
- * Input parameters:
- *   the_scheduler  - pointer to scheduler control
- *   the_thread     - pointer to thread control block
- *
- * Output parameters:  NONE
- *
- *  INTERRUPT LATENCY:
+ *  @param[in] the_thread  - pointer to thread
  */
-
 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Block_body(
-  Scheduler_Control *the_scheduler,
   Thread_Control   *the_thread
 )
 {
@@ -223,7 +179,7 @@
   /* TODO: flash critical section */
 
   if ( _Thread_Is_heir( the_thread ) )
-     _Scheduler_priority_Schedule_body(the_scheduler);
+     _Scheduler_priority_Schedule_body();
 
   if ( _Thread_Is_executing( the_thread ) )
     _Thread_Dispatch_necessary = true;
@@ -231,32 +187,22 @@
   return;
 }
 
-/*
- *  _Scheduler_priority_Unblock_body
+/**
+ *  @brief _Scheduler_priority_Unblock_body
  *
  *  This kernel routine readies the requested thread according to the queuing 
  *  discipline. A new heir thread may be selected.
  *
- *  Input parameters:
- *    the_scheduler - pointer to scheduler control
- *    the_thread    - pointer to thread control block
+ *  @param[in] the_thread  - pointer to thread
  *
- *  Output parameters:  NONE
- *
- *  NOTE:  This routine uses the "blocking" heir selection mechanism.
- *         This ensures the correct heir after a thread restart.
- *
- *  INTERRUPT LATENCY:
+ *  @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 (
-  Scheduler_Control       *the_scheduler __attribute__((unused)),
   Thread_Control          *the_thread
 )
 {
-  _Scheduler_priority_Ready_queue_enqueue(
-      the_thread
-  );
+  _Scheduler_priority_Ready_queue_enqueue(the_thread);
 
   /* TODO: flash critical section */
 

diff -u rtems/cpukit/score/src/scheduler.c:1.1 rtems/cpukit/score/src/scheduler.c:1.2
--- rtems/cpukit/score/src/scheduler.c:1.1	Wed Nov 24 09:51:28 2010
+++ rtems/cpukit/score/src/scheduler.c	Thu Feb 17 16:21:44 2011
@@ -2,6 +2,7 @@
  *  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
@@ -27,19 +28,14 @@
 /*
  *  _Scheduler_Handler_initialization
  *
- *  This routine initializes the scheduler by calling the scheduler_init 
- *  function registered in the Configuration Scheduler Table.
+ *  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_Handler_initialization(void)
 {
-  Scheduler_Control *the_scheduler = &_Scheduler;
-
-  (*(_Scheduler_Table[Configuration.scheduler_policy].scheduler_init))(
-      the_scheduler
-  );
+  (*_Scheduler.Operations.initialize)();
 }

diff -u rtems/cpukit/score/src/schedulerpriority.c:1.2 rtems/cpukit/score/src/schedulerpriority.c:1.3
--- rtems/cpukit/score/src/schedulerpriority.c:1.2	Thu Nov 25 07:24:26 2010
+++ rtems/cpukit/score/src/schedulerpriority.c	Thu Feb 17 16:21:44 2011
@@ -2,6 +2,7 @@
  *  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
@@ -29,38 +30,8 @@
 
 Priority_bit_map_Control          _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
 
-/*
- *  _Scheduler_priority_Initialize
- *
- * Initializes the scheduler for priority scheduling.
- *
- *  Input parameters:
- *    the_scheduler - pointer to scheduler control
- *
- *  Output parameters: NONE
- */
-
-void _Scheduler_priority_Initialize (
-    Scheduler_Control       *the_scheduler
-)
+void _Scheduler_priority_Initialize(void)
 {
-  /* the operations table is a jump table to redirect generic scheduler 
-   * function calls to scheduler implementation specific functions.  The 
-   * main purpose of scheduler initialization is to set up the jump table 
-   * for the scheduler.  Every scheduler implementation provides its own
-   * scheduler operations table.
-   */
-  the_scheduler->Operations.schedule           = &_Scheduler_priority_Schedule;
-  the_scheduler->Operations.yield              = &_Scheduler_priority_Yield;
-  the_scheduler->Operations.block              = &_Scheduler_priority_Block;
-  the_scheduler->Operations.unblock            = &_Scheduler_priority_Unblock;
-  the_scheduler->Operations.scheduler_allocate = 
-      &_Scheduler_priority_Thread_scheduler_allocate;
-  the_scheduler->Operations.scheduler_free     = 
-      &_Scheduler_priority_Thread_scheduler_free;
-  the_scheduler->Operations.scheduler_update   = 
-      &_Scheduler_priority_Thread_scheduler_update;
-
-  _Scheduler_priority_Ready_queue_initialize( the_scheduler );
+  _Scheduler_priority_Ready_queue_initialize();
   _Priority_bit_map_Handler_initialization( );
 }

diff -u rtems/cpukit/score/src/schedulerpriorityblock.c:1.2 rtems/cpukit/score/src/schedulerpriorityblock.c:1.3
--- rtems/cpukit/score/src/schedulerpriorityblock.c:1.2	Fri Jan 28 14:24:53 2011
+++ rtems/cpukit/score/src/schedulerpriorityblock.c	Thu Feb 17 16:21:44 2011
@@ -2,6 +2,7 @@
  *  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
@@ -24,25 +25,9 @@
 #include <rtems/score/schedulerpriority.h>
 #include <rtems/score/thread.h>
 
-/*
- * _Scheduler_priority_Block
- *
- * This kernel routine removes the_thread from scheduling decisions based 
- * on simple queue extraction.
- *
- * Input parameters:
- *   the_scheduler  - pointer to scheduler control
- *   the_thread     - pointer to thread control block
- *
- * Output parameters:  NONE
- *
- *  INTERRUPT LATENCY:
- */
-
 void _Scheduler_priority_Block(
-  Scheduler_Control *the_scheduler,
   Thread_Control   *the_thread
 )
 {
-  _Scheduler_priority_Block_body(the_scheduler, the_thread);
+  _Scheduler_priority_Block_body(the_thread);
 }

diff -u rtems/cpukit/score/src/schedulerpriorityschedule.c:1.2 rtems/cpukit/score/src/schedulerpriorityschedule.c:1.3
--- rtems/cpukit/score/src/schedulerpriorityschedule.c:1.2	Fri Jan 28 14:24:53 2011
+++ rtems/cpukit/score/src/schedulerpriorityschedule.c	Thu Feb 17 16:21:44 2011
@@ -2,6 +2,7 @@
  *  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
@@ -15,34 +16,10 @@
 #endif
 
 #include <rtems/system.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/percpu.h>
 #include <rtems/score/scheduler.h>
 #include <rtems/score/schedulerpriority.h>
-#include <rtems/score/thread.h>
 
-/*
- * _Scheduler_priority_Schedule
- *
- * This kernel routine implements scheduling decision logic for priority-based
- * scheduling.  
- *
- * Input parameters:
- *   the_scheduler  - pointer to scheduler control
- *   the_thread     - pointer to thread control block
- *
- * Output parameters:  NONE
- *
- *  INTERRUPT LATENCY:
- */
-
-void _Scheduler_priority_Schedule(
-  Scheduler_Control     *the_scheduler
-)
+void _Scheduler_priority_Schedule(void)
 {
-  _Scheduler_priority_Schedule_body( the_scheduler );
+  _Scheduler_priority_Schedule_body();
 }

diff -u rtems/cpukit/score/src/schedulerprioritythreadschedulerallocate.c:1.2 rtems/cpukit/score/src/schedulerprioritythreadschedulerallocate.c:1.3
--- rtems/cpukit/score/src/schedulerprioritythreadschedulerallocate.c:1.2	Thu Nov 25 07:24:26 2010
+++ rtems/cpukit/score/src/schedulerprioritythreadschedulerallocate.c	Thu Feb 17 16:21:44 2011
@@ -16,38 +16,20 @@
 
 #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>
 #include <rtems/score/wkspace.h>
 
-/*
- *  _Scheduler_priority_Thread_scheduler_allocate
- *
- * Allocates @a the_thread->scheduler
- *
- *  Input parameters:
- *    the_scheduler - pointer to scheduler control
- *    the_thread    - pointer to thread control block
- *
- *  Output parameters: 
- *    Returns pointer to allocated space.
- */
-
-void* _Scheduler_priority_Thread_scheduler_allocate (
-  Scheduler_Control     *the_scheduler __attribute__((unused)),
+void *_Scheduler_priority_Thread_scheduler_allocate (
   Thread_Control        *the_thread
 )
 {
-  void                  *sched;
+  void  *sched;
 
   sched = _Workspace_Allocate( sizeof(Scheduler_priority_Per_thread) );
 
-  the_thread->scheduler.priority = (Scheduler_priority_Per_thread*) sched;
+  the_thread->scheduler.priority = (Scheduler_priority_Per_thread *) sched;
 
   return sched;
 }

diff -u rtems/cpukit/score/src/schedulerprioritythreadschedulerfree.c:1.2 rtems/cpukit/score/src/schedulerprioritythreadschedulerfree.c:1.3
--- rtems/cpukit/score/src/schedulerprioritythreadschedulerfree.c:1.2	Thu Nov 25 07:24:26 2010
+++ rtems/cpukit/score/src/schedulerprioritythreadschedulerfree.c	Thu Feb 17 16:21:44 2011
@@ -2,6 +2,7 @@
  *  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
@@ -25,21 +26,8 @@
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 
-/*
- *  _Scheduler_priority_Thread_scheduler_free
- *
- * Frees @a the_thread->scheduler
- *
- *  Input parameters:
- *    the_scheduler - pointer to scheduler control
- *    the_thread    - pointer to thread control block
- *
- *  Output parameters: NONE
- */
-
 void _Scheduler_priority_Thread_scheduler_free (
-    Scheduler_Control *the_scheduler __attribute__((unused)),
-    Thread_Control    *the_thread
+  Thread_Control    *the_thread
 )
 {
   _Workspace_Free( the_thread->scheduler.priority );

diff -u rtems/cpukit/score/src/schedulerprioritythreadschedulerupdate.c:1.2 rtems/cpukit/score/src/schedulerprioritythreadschedulerupdate.c:1.3
--- rtems/cpukit/score/src/schedulerprioritythreadschedulerupdate.c:1.2	Thu Nov 25 07:24:26 2010
+++ rtems/cpukit/score/src/schedulerprioritythreadschedulerupdate.c	Thu Feb 17 16:21:44 2011
@@ -2,6 +2,7 @@
  *  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
@@ -16,34 +17,18 @@
 
 #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/priority.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>
 
-/*
- *  _Scheduler_priority_Thread_scheduler_update
- *
- * Updates @a the_thread->scheduler
- *
- *  Input parameters:
- *    the_scheduler - pointer to scheduler control
- *    the_thread    - pointer to thread control block
- *
- *  Output parameters: NONE
- */
-
-void _Scheduler_priority_Thread_scheduler_update (
-    Scheduler_Control *the_scheduler,
-    Thread_Control    *the_thread
+void _Scheduler_priority_Thread_scheduler_update(
+  Thread_Control    *the_thread
 )
 {
-  Chain_Control *rq = the_scheduler->Ready_queues.priority;
+  Chain_Control *rq = _Scheduler.Ready_queues.priority;
+
   the_thread->scheduler.priority->ready_chain = &rq[
     the_thread->current_priority 
   ];

diff -u rtems/cpukit/score/src/schedulerpriorityunblock.c:1.2 rtems/cpukit/score/src/schedulerpriorityunblock.c:1.3
--- rtems/cpukit/score/src/schedulerpriorityunblock.c:1.2	Fri Jan 28 14:24:53 2011
+++ rtems/cpukit/score/src/schedulerpriorityunblock.c	Thu Feb 17 16:21:44 2011
@@ -2,6 +2,7 @@
  *  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
@@ -15,43 +16,12 @@
 #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/schedulerpriority.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>
-
-/*
- *  _Scheduler_priority_Unblock
- *
- *  This kernel routine readies the requested thread according to the queuing 
- *  discipline. A new heir thread may be selected.
- *
- *  Input parameters:
- *    the_scheduler - pointer to scheduler control
- *    the_thread    - pointer to thread control block
- *
- *  Output parameters:  NONE
- *
- *  NOTE:  This routine uses the "blocking" heir selection mechanism.
- *         This ensures the correct heir after a thread restart.
- *
- *  INTERRUPT LATENCY:
- */
 
 void _Scheduler_priority_Unblock (
-  Scheduler_Control       *the_scheduler,
   Thread_Control          *the_thread
 )
 {
-  _Scheduler_priority_Unblock_body(the_scheduler, the_thread);
+  _Scheduler_priority_Unblock_body(the_thread);
 }

diff -u rtems/cpukit/score/src/schedulerpriorityyield.c:1.4 rtems/cpukit/score/src/schedulerpriorityyield.c:1.5
--- rtems/cpukit/score/src/schedulerpriorityyield.c:1.4	Fri Jan 28 14:24:53 2011
+++ rtems/cpukit/score/src/schedulerpriorityyield.c	Thu Feb 17 16:21:44 2011
@@ -30,28 +30,12 @@
 #include <rtems/score/wkspace.h>
 
 /*
- *  _Scheduler_priority_Yield
- *
- *  This kernel routine will remove the running THREAD from the ready queue
- *  and place it immediately at the rear of this chain.  Reset timeslice
- *  and yield the processor functions both use this routine, therefore if
- *  reset is true and this is the only thread on the queue then the
- *  timeslice counter is reset.  The heir THREAD will be updated if the
- *  running is also the currently the heir.
- *
- *  Input parameters:
- *    the_scheduler - pointer to scheduler control
- *
- *  Output parameters:  NONE
- *
  *  INTERRUPT LATENCY:
  *    ready chain
  *    select heir
  */
 
-void _Scheduler_priority_Yield( 
-    Scheduler_Control   *the_scheduler __attribute__((unused))
-)
+void _Scheduler_priority_Yield(void)
 {
   ISR_Level       level;
   Thread_Control *executing;

diff -u rtems/cpukit/score/src/threadchangepriority.c:1.16 rtems/cpukit/score/src/threadchangepriority.c:1.17
--- rtems/cpukit/score/src/threadchangepriority.c:1.16	Fri Jan 28 14:24:53 2011
+++ rtems/cpukit/score/src/threadchangepriority.c	Thu Feb 17 16:21:44 2011
@@ -17,39 +17,11 @@
 #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/schedulerpriority.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>
-
-/*PAGE
- *
- *  _Thread_Change_priority
- *
- *  This kernel routine changes the priority of the thread.  The
- *  thread chain is adjusted if necessary.
- *
- *  Input parameters:
- *    the_thread   - pointer to thread control block
- *    new_priority - ultimate priority
- *    prepend_it   - true if the thread should be prepended to the chain
- *
- *  Output parameters:  NONE
- *
- *  INTERRUPT LATENCY:
- *    ready chain
- *    select heir
- */
 
 void _Thread_Change_priority(
   Thread_Control   *the_thread,
@@ -137,7 +109,7 @@
    *  We altered the set of thread priorities.  So let's figure out
    *  who is the heir and if we need to switch to them.
    */
-  _Scheduler_Schedule(&_Scheduler);
+  _Scheduler_Schedule();
 
   if ( !_Thread_Is_executing_also_the_heir() &&
        _Thread_Executing->is_preemptible )

diff -u rtems/cpukit/score/src/threadclearstate.c:1.14 rtems/cpukit/score/src/threadclearstate.c:1.15
--- rtems/cpukit/score/src/threadclearstate.c:1.14	Fri Jan 28 14:24:53 2011
+++ rtems/cpukit/score/src/threadclearstate.c	Thu Feb 17 16:21:44 2011
@@ -1,8 +1,7 @@
 /*
- *  Thread Handler
+ *  Thread Handler / Thread Clear State
  *
- *
- *  COPYRIGHT (c) 1989-1999.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -31,26 +30,11 @@
 #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
 
-/*PAGE
- *
- *  _Thread_Clear_state
- *
- *  This kernel routine clears the appropriate states in the
- *  requested thread.  The thread ready chain is adjusted if
- *  necessary and the Heir thread is set accordingly.
- *
- *  Input parameters:
- *    the_thread - pointer to thread control block
- *    state      - state set to clear
- *
- *  Output parameters:  NONE
- *
+/*
  *  INTERRUPT LATENCY:
  *    priority map
  *    select heir
  */
-
-
 void _Thread_Clear_state(
   Thread_Control *the_thread,
   States_Control  state
@@ -67,7 +51,7 @@
       the_thread->current_state = _States_Clear( state, current_state );
 
       if ( _States_Is_ready( current_state ) ) {
-        _Scheduler_Unblock( &_Scheduler, the_thread);
+        _Scheduler_Unblock( the_thread );
       }
   }
   _ISR_Enable( level );

diff -u rtems/cpukit/score/src/threadclose.c:1.15 rtems/cpukit/score/src/threadclose.c:1.16
--- rtems/cpukit/score/src/threadclose.c:1.15	Tue Feb 15 18:24:49 2011
+++ rtems/cpukit/score/src/threadclose.c	Thu Feb 17 16:21:44 2011
@@ -1,8 +1,7 @@
 /*
- *  Thread Handler
+ *  Thread Handler / Thread Close
  *
- *
- *  COPYRIGHT (c) 1989-2008.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -31,16 +30,6 @@
 #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
 
-/*
- *  _Thread_Close
- *
- *  DESCRIPTION:
- *
- *  This routine frees all memory associated with the specified
- *  thread and removes it from the local object table so no further
- *  operations on this thread are allowed.
- */
-
 void _Thread_Close(
   Objects_Information  *information,
   Thread_Control       *the_thread
@@ -89,7 +78,7 @@
   /*
    * Free the per-thread scheduling information.
    */
-  _Scheduler_Thread_scheduler_free( &_Scheduler, the_thread );
+  _Scheduler_Thread_scheduler_free( the_thread );
 
   /*
    *  The thread might have been FP.  So deal with that.

diff -u rtems/cpukit/score/src/threadinitialize.c:1.42 rtems/cpukit/score/src/threadinitialize.c:1.43
--- rtems/cpukit/score/src/threadinitialize.c:1.42	Tue Feb 15 18:24:49 2011
+++ rtems/cpukit/score/src/threadinitialize.c	Thu Feb 17 16:21:44 2011
@@ -1,8 +1,7 @@
 /*
- *  Thread Handler
+ *  Thread Handler / Thread Initialize
  *
- *
- *  COPYRIGHT (c) 1989-2009.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -194,7 +193,7 @@
   the_thread->resource_count          = 0;
   the_thread->real_priority           = priority;
   the_thread->Start.initial_priority  = priority;
-  sched =_Scheduler_Thread_scheduler_allocate( &_Scheduler, the_thread );
+  sched =_Scheduler_Thread_scheduler_allocate( the_thread );
   if ( !sched )
     goto failed;
   _Thread_Set_priority( the_thread, priority );

diff -u rtems/cpukit/score/src/threadready.c:1.11 rtems/cpukit/score/src/threadready.c:1.12
--- rtems/cpukit/score/src/threadready.c:1.11	Fri Jan 28 14:24:54 2011
+++ rtems/cpukit/score/src/threadready.c	Thu Feb 17 16:21:44 2011
@@ -1,8 +1,7 @@
 /*
- *  Thread Handler
+ *  Thread Handler / Thread Ready
  *
- *
- *  COPYRIGHT (c) 1989-2006.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -31,26 +30,11 @@
 #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
 
-/*PAGE
- *
- *  _Thread_Ready
- *
- *  This kernel routine readies the requested thread, the thread chain
- *  is adjusted.  A new heir thread may be selected.
- *
- *  Input parameters:
- *    the_thread - pointer to thread control block
- *
- *  Output parameters:  NONE
- *
- *  NOTE:  This routine uses the "blocking" heir selection mechanism.
- *         This ensures the correct heir after a thread restart.
- *
+/*
  *  INTERRUPT LATENCY:
  *    ready chain
  *    select heir
  */
-
 void _Thread_Ready(
   Thread_Control *the_thread
 )
@@ -61,7 +45,7 @@
 
   the_thread->current_state = STATES_READY;
 
-  _Scheduler_Unblock( &_Scheduler, the_thread );
+  _Scheduler_Unblock( the_thread );
 
   _ISR_Enable( level );
 }

diff -u rtems/cpukit/score/src/threadresume.c:1.14 rtems/cpukit/score/src/threadresume.c:1.15
--- rtems/cpukit/score/src/threadresume.c:1.14	Fri Jan 28 14:24:54 2011
+++ rtems/cpukit/score/src/threadresume.c	Thu Feb 17 16:21:44 2011
@@ -1,8 +1,8 @@
 /*
- *  Thread Handler
+ *  Thread Handler / Thread Resume
  *
  *
- *  COPYRIGHT (c) 1989-1999.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -31,27 +31,11 @@
 #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
 
-/*PAGE
- *
- *  _Thread_Resume
- *
- *  This kernel routine clears the SUSPEND state if the suspend_count
- *  drops below one.  If the force parameter is set the suspend_count
- *  is forced back to zero. The thread ready chain is adjusted if
- *  necessary and the Heir thread is set accordingly.
- *
- *  Input parameters:
- *    the_thread - pointer to thread control block
- *    force      - force the suspend count back to 0
- *
- *  Output parameters:  NONE
- *
+/*
  *  INTERRUPT LATENCY:
  *    priority map
  *    select heir
  */
-
-
 void _Thread_Resume(
   Thread_Control   *the_thread,
   bool              force
@@ -69,7 +53,7 @@
     the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
 
     if ( _States_Is_ready( current_state ) ) {
-      _Scheduler_Unblock( &_Scheduler, the_thread );
+      _Scheduler_Unblock( the_thread );
     }
   }
 

diff -u rtems/cpukit/score/src/threadsetpriority.c:1.7 rtems/cpukit/score/src/threadsetpriority.c:1.8
--- rtems/cpukit/score/src/threadsetpriority.c:1.7	Fri Jan 28 14:24:54 2011
+++ rtems/cpukit/score/src/threadsetpriority.c	Thu Feb 17 16:21:44 2011
@@ -1,8 +1,7 @@
 /*
- *  Thread Handler
+ *  Thread Handler / Thread Set Priority
  *
- *
- *  COPYRIGHT (c) 1989-1999.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -31,20 +30,6 @@
 #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
 
-/*PAGE
- *
- * _Thread_Set_priority
- *
- * This directive enables and disables several modes of
- * execution for the requesting thread.
- *
- *  Input parameters:
- *    the_thread   - pointer to thread priority
- *    new_priority - new priority
- *
- *  Output: NONE
- */
-
 void _Thread_Set_priority(
   Thread_Control   *the_thread,
   Priority_Control  new_priority
@@ -52,5 +37,5 @@
 {
   the_thread->current_priority = new_priority;
 
-  _Scheduler_Thread_scheduler_update(&_Scheduler, the_thread);
+  _Scheduler_Thread_scheduler_update( the_thread );
 }

diff -u rtems/cpukit/score/src/threadsetstate.c:1.10 rtems/cpukit/score/src/threadsetstate.c:1.11
--- rtems/cpukit/score/src/threadsetstate.c:1.10	Fri Jan 28 14:24:54 2011
+++ rtems/cpukit/score/src/threadsetstate.c	Thu Feb 17 16:21:44 2011
@@ -1,8 +1,7 @@
 /*
- *  Thread Handler
+ *  Thread Handler / Thread Set State
  *
- *
- *  COPYRIGHT (c) 1989-1999.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -31,24 +30,11 @@
 #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
 
-/*PAGE
- *
- * _Thread_Set_state
- *
- * This kernel routine sets the requested state in the THREAD.  The
- * THREAD chain is adjusted if necessary.
- *
- * Input parameters:
- *   the_thread   - pointer to thread control block
- *   state - state to be set
- *
- * Output parameters:  NONE
- *
+/*
  *  INTERRUPT LATENCY:
  *    ready chain
  *    select map
  */
-
 void _Thread_Set_state(
   Thread_Control *the_thread,
   States_Control  state
@@ -66,7 +52,7 @@
 
   the_thread->current_state = state;
 
-  _Scheduler_Block( &_Scheduler, the_thread);
+  _Scheduler_Block( the_thread );
 
   _ISR_Enable( level );
 }

diff -u rtems/cpukit/score/src/threadsuspend.c:1.11 rtems/cpukit/score/src/threadsuspend.c:1.12
--- rtems/cpukit/score/src/threadsuspend.c:1.11	Fri Jan 28 14:24:54 2011
+++ rtems/cpukit/score/src/threadsuspend.c	Thu Feb 17 16:21:44 2011
@@ -1,8 +1,8 @@
 /*
- *  Thread Handler
+ *  Thread Handler / Thread Suspend
  *
  *
- *  COPYRIGHT (c) 1989-1999.
+ *  COPYRIGHT (c) 1989-2011.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -31,23 +31,10 @@
 #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
 
-/*PAGE
- *
- * _Thread_Suspend
- *
- * This kernel routine sets the SUSPEND state in the THREAD.  The
- * THREAD chain and suspend count are adjusted if necessary.
- *
- * Input parameters:
- *   the_thread   - pointer to thread control block
- *
- * Output parameters:  NONE
- *
- *  INTERRUPT LATENCY:
+/*  INTERRUPT LATENCY:
  *    ready chain
  *    select map
  */
-
 void _Thread_Suspend(
   Thread_Control   *the_thread
 )
@@ -64,7 +51,7 @@
 
   the_thread->current_state = STATES_SUSPENDED;
 
-  _Scheduler_Block(&_Scheduler, the_thread);
+  _Scheduler_Block( the_thread );
 
   _ISR_Enable( level );
 }


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

	* user/conf.t: Document changes to Scheduler configuration.

M  1.297  doc/ChangeLog
M   1.67  doc/user/conf.t

diff -u rtems/doc/ChangeLog:1.296 rtems/doc/ChangeLog:1.297
--- rtems/doc/ChangeLog:1.296	Wed Feb  2 09:01:16 2011
+++ rtems/doc/ChangeLog	Thu Feb 17 16:37:05 2011
@@ -1,3 +1,7 @@
+2011-02-17	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	* user/conf.t: Document changes to Scheduler configuration.
+
 2011-02-02	Ralf Corsépius <ralf.corsepius at rtems.org>
 
 	* configure.ac: Require autoconf-2.68, automake-1.11.1.

diff -u rtems/doc/user/conf.t:1.66 rtems/doc/user/conf.t:1.67
--- rtems/doc/user/conf.t:1.66	Wed Nov 24 09:52:21 2010
+++ rtems/doc/user/conf.t	Thu Feb 17 16:37:06 2011
@@ -394,50 +394,52 @@
 @c
 @c
 @subsection Scheduler Algorithm Configuration
+
 This section defines the configuration parameters related to selecting 
-a scheduling algorithm for an application.  Regardless of whether 
- at code{CONFIGURE_SCHEDULER_POLICY} is defined, if none of the other 
-configuration parameters are set, then @code{rtems/confdefs.h} will define 
- at code{CONFIGURE_SCHEDULER_PRIORITY} and will (re)define 
- at code{CONFIGURE_SCHEDULER_POLICY} as @code{_Scheduler_Priority}. That is, 
- at code{CONFIGURE_SCHEDULER_PRIORITY} is the default scheduling algorithm.
+a scheduling algorithm for an application.  For the schedulers built into RTEMS, the configuration is straightforward.  All that is required is to define the configuration macro which specifies which scheduler you want for in your application.  The currently available schedulers are:
 
 @itemize @bullet
- at findex CONFIGURE_SCHEDULER_POLICY
- at item @code{CONFIGURE_SCHEDULER_POLICY} is defined to specify which 
-scheduling algorithm an application will use.  If it is undefined, 
-then @code{rtems/confdefs.h} will define it based on the definition 
-of the following configuration parameters.
-Valid values for this configuration parameter are: 
- at code{_Scheduler_USER},
- at code{_Scheduler_Priority}.
+
+ at findex CONFIGURE_SCHEDULER_PRIORITY
+ at item Deterministic Priority Scheduler - This is the default scheduler
+in RTEMS and is designed for predictable performance under the highest
+loads.  It can block or unblock a thread in a constant amount of time.
+This scheduler requires a variable amount of memory based upon the number
+of priorities configured in the system.  This scheduler may be explicitly
+selected by defining @code{CONFIGURE_SCHEDULER_PRIORITY}.
+
+ at end itemize
+
+The pluggable scheduler interface was added after the 4.10 release series
+so there are not a lot of options at this point.  We anticipate a lower
+memory, non-deterministic priority scheduler suitable for use in small
+systems and an Earliest Deadline First Scheduler (EDF) to arrive in
+the future.
+
+The pluggable scheduler interface enables the user to provide their own scheduling algorithm.  If you choose to do this, you must define multiple configuration macros.  
 
 @findex CONFIGURE_SCHEDULER_USER
- at item @code{CONFIGURE_SCHEDULER_USER} is defined if the application 
-provides its own scheduling algorithm. If @code{CONFIGURE_SCHEDULER_USER} is 
-defined then @code{CONFIGURE_SCHEDULER_ENTRY_USER} must be defined with the 
-name of the application's initialization function.  If both 
-configuration parameters are defined and @code{CONFIGURE_SCHEDULER_POLICY} 
-is undefined, then @code{CONFIGURE_SCHEDULER_POLICY} will be be defined as 
- at code{_Scheduler_USER}.
-
- at findex CONFIGURE_SCHEDULER_ALL
- at item @code{CONFIGURE_SCHEDULER_ALL} is defined if the application 
-chooses to include all of the RTEMS-provided schedulers.  
- at code{CONFIGURE_SCHEDULER_ALL} will define all of the following configuration 
-parameters and will use @code{CONFIGURE_SCHEDULER_POLICY} to select the 
-algorithm to use. If @code{CONFIGURE_SCHEDULER_POLICY} is not defined, then 
- at code{rtems/confdefs.h} will define it as @code{_Scheduler_Priority}.
+First, you must define @code{CONFIGURE_SCHEDULER_USER} to indicate the application provides its own scheduling algorithm. If @code{CONFIGURE_SCHEDULER_USER} is defined then the following additional macros must be defined:
 
- at findex CONFIGURE_SCHEDULER_PRIORITY
- at item @code{CONFIGURE_SCHEDULER_PRIORITY} is defined if the application 
-will use the Priority Scheduling algorithm.
-If none of the previous configuration parameters are defined by the 
-application, then @code{rtems/confdefs.h} will define 
- at code{CONFIGURE_SCHEDULER_POLICY} as @code{_Scheduler_PRIORITY}.
+ at itemize @bullet
+ at item @code{CONFIGURE_SCHEDULER_USER_ENTRY_POINTS} must be defined with the set of methods which implement this scheduler.  
+
+ at item @code{CONFIGURE_MEMORY_FOR_SCHEDULER} must be defined with the
+amount of memory required as a base amount for the scheduler.
+
+ at item @code{CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER(_tasks)} must be
+defined as a formula which computes the amount of memory required based upon the number of tasks configured.
 
 @end itemize
 
+At this time, the mechanics and requirements for writing a new
+scheduler are evolving and not fully documented.  It is recommended
+that you look at the existing Deterministic Priority Scheduler
+in @code{cpukit/score/src/schedulerpriority*.c} for guidance.
+For guidance on the configuration macros, please examine
+ at code{cpukit/sapi/include/confdefs.h} for how these are defined for the
+Deterministic Priority Scheduler.
+
 @c
 @c
 @c



--

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/20110217/1bc35d36/attachment-0001.html>


More information about the vc mailing list