<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-02-17)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-02-17 Joel Sherrill <joel.sherrill@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.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/ChangeLog.diff?r1=text&tr1=1.2717&r2=text&tr2=1.2718&diff_format=h">M</a></td><td width='1%'>1.2718</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/sapi/include/confdefs.h.diff?r1=text&tr1=1.154&r2=text&tr2=1.155&diff_format=h">M</a></td><td width='1%'>1.155</td><td width='100%'>cpukit/sapi/include/confdefs.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/sapi/include/rtems/config.h.diff?r1=text&tr1=1.54&r2=text&tr2=1.55&diff_format=h">M</a></td><td width='1%'>1.55</td><td width='100%'>cpukit/sapi/include/rtems/config.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/include/rtems/score/scheduler.h.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/score/include/rtems/score/scheduler.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/include/rtems/score/schedulerpriority.h.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>cpukit/score/include/rtems/score/schedulerpriority.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/inline/rtems/score/scheduler.inl.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>cpukit/score/inline/rtems/score/scheduler.inl</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/inline/rtems/score/schedulerpriority.inl.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>cpukit/score/inline/rtems/score/schedulerpriority.inl</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/scheduler.c.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>cpukit/score/src/scheduler.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulerpriority.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>cpukit/score/src/schedulerpriority.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulerpriorityblock.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>cpukit/score/src/schedulerpriorityblock.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulerpriorityschedule.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>cpukit/score/src/schedulerpriorityschedule.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulerprioritythreadschedulerallocate.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>cpukit/score/src/schedulerprioritythreadschedulerallocate.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulerprioritythreadschedulerfree.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>cpukit/score/src/schedulerprioritythreadschedulerfree.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulerprioritythreadschedulerupdate.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>cpukit/score/src/schedulerprioritythreadschedulerupdate.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulerpriorityunblock.c.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>cpukit/score/src/schedulerpriorityunblock.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/schedulerpriorityyield.c.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>cpukit/score/src/schedulerpriorityyield.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/threadchangepriority.c.diff?r1=text&tr1=1.16&r2=text&tr2=1.17&diff_format=h">M</a></td><td width='1%'>1.17</td><td width='100%'>cpukit/score/src/threadchangepriority.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/threadclearstate.c.diff?r1=text&tr1=1.14&r2=text&tr2=1.15&diff_format=h">M</a></td><td width='1%'>1.15</td><td width='100%'>cpukit/score/src/threadclearstate.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/threadclose.c.diff?r1=text&tr1=1.15&r2=text&tr2=1.16&diff_format=h">M</a></td><td width='1%'>1.16</td><td width='100%'>cpukit/score/src/threadclose.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/threadinitialize.c.diff?r1=text&tr1=1.42&r2=text&tr2=1.43&diff_format=h">M</a></td><td width='1%'>1.43</td><td width='100%'>cpukit/score/src/threadinitialize.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/threadready.c.diff?r1=text&tr1=1.11&r2=text&tr2=1.12&diff_format=h">M</a></td><td width='1%'>1.12</td><td width='100%'>cpukit/score/src/threadready.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/threadresume.c.diff?r1=text&tr1=1.14&r2=text&tr2=1.15&diff_format=h">M</a></td><td width='1%'>1.15</td><td width='100%'>cpukit/score/src/threadresume.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/threadsetpriority.c.diff?r1=text&tr1=1.7&r2=text&tr2=1.8&diff_format=h">M</a></td><td width='1%'>1.8</td><td width='100%'>cpukit/score/src/threadsetpriority.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/threadsetstate.c.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&diff_format=h">M</a></td><td width='1%'>1.11</td><td width='100%'>cpukit/score/src/threadsetstate.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/threadsuspend.c.diff?r1=text&tr1=1.11&r2=text&tr2=1.12&diff_format=h">M</a></td><td width='1%'>1.12</td><td width='100%'>cpukit/score/src/threadsuspend.c</td></tr>
</table>
<pre>
<font color='#006600'>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
</font><font color='#997700'>@@ -1,5 +1,31 @@
</font> 2011-02-17        Joel Sherrill <joel.sherrill@oarcorp.com>
 
<font color='#000088'>+   * 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@oarcorp.com>
+
</font>   * 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.

<font color='#006600'>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
</font><font color='#997700'>@@ -26,7 +26,7 @@
</font>  */
 
 /*
<font color='#880000'>- *  COPYRIGHT (c) 1989-2010.
</font><font color='#000088'>+ *  COPYRIGHT (c) 1989-2011.
</font>  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
<font color='#997700'>@@ -521,6 +521,9 @@
</font>  *  This configures the maximum priority value that
  *  a task may have.
  *
<font color='#000088'>+ *  The following applies to the data space requirements
+ *  of the Priority Scheduler.
+ *
</font>  *  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
<font color='#997700'>@@ -540,8 +543,7 @@
</font>  *    + 127, 125 application priorities, 1536 bytes saved
  *    + 255, 253 application priorities, 0 bytes saved
  *
<font color='#880000'>- *  It is specified in terms of Classic API
- *  priority values.
</font><font color='#000088'>+ *  It is specified in terms of Classic API priority values.
</font>  */
 #ifndef CONFIGURE_MAXIMUM_PRIORITY
   #define CONFIGURE_MAXIMUM_PRIORITY PRIORITY_DEFAULT_MAXIMUM
<font color='#997700'>@@ -552,111 +554,60 @@
</font>  *
  * The scheduler configuration allows an application to select the<span style="background-color: #FF0000"> </span>
  * scheduling policy to use.  The supported configurations are:
<font color='#880000'>- *  CONFIGURE_SCHEDULER_USER
- *  CONFIGURE_SCHEDULER_PRIORITY
</font><font color='#000088'>+ *  CONFIGURE_SCHEDULER_USER     - user provided scheduler
+ *  CONFIGURE_SCHEDULER_PRIORITY - Deterministic Priority Scheduler
</font>  *<span style="background-color: #FF0000"> </span>
  * If no configuration is specified by the application, then<span style="background-color: #FF0000"> </span>
  * CONFIGURE_SCHEDULER_PRIORITY is assumed to be the default.
  *
  * An application can define its own scheduling policy by defining
<font color='#880000'>- * CONFIGURE_SCHEDULER_USER and CONFIGURE_SCHEDULER_ENTRY_USER to point
- * to an initialization routine.  Note: CONFIGURE_SCHEDULER_USER is not<span style="background-color: #FF0000"> </span>
- * fully supported, since it has no per-thread field.
- *
- * To add a new scheduler:
</font><font color='#000088'>+ * CONFIGURE_SCHEDULER_USER and the following:
+ *    - CONFIGURE_SCHEDULER_ENTRY_POINTS<span style="background-color: #FF0000"> </span>
+ *    - CONFIGURE_MEMORY_FOR_SCHEDULER - base memory
+ *    - CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER - per task memory
</font>  */
 #include <rtems/score/scheduler.h>
 
 #if defined(CONFIGURE_SCHEDULER_USER) && \
<font color='#880000'>-    !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
</font><font color='#000088'>+    !defined(CONFIGURE_SCHEDULER_USER_ENTRY_POINTS)
+  #error "CONFIGURE_ERROR: CONFIGURE_SCHEDULER_USER requires CONFIGURE_SCHEDULER_USER_ENTRY_POINTS"
</font> #endif
 
 /* If no scheduler is specified, the priority scheduler is default. */
 #if !defined(CONFIGURE_SCHEDULER_USER) && \
     !defined(CONFIGURE_SCHEDULER_PRIORITY)
   #define CONFIGURE_SCHEDULER_PRIORITY
<font color='#880000'>-  #define CONFIGURE_SCHEDULER_POLICY _Scheduler_PRIORITY
-#endif
-
-/*
- * If a user scheduler is specified and no policy is set,<span style="background-color: #FF0000"> </span>
- * the user scheduler is the default policy.
- */
-#if defined(CONFIGURE_SCHEDULER_USER) && \
-    !defined(CONFIGURE_SCHEDULER_POLICY)
-  #define CONFIGURE_SCHEDULER_POLICY _Scheduler_USER
</font> #endif
 
 /*<span style="background-color: #FF0000"> </span>
<font color='#880000'>- * Check for priority scheduler next, as it is the default policy if there
- * is no CONFIGURE_SCHEDULER_POLICY set and no USER scheduler provided.
</font><font color='#000088'>+ * Is the Priority Scheduler is selected, then configure for it.
</font>  */
 #if defined(CONFIGURE_SCHEDULER_PRIORITY)
   #include <rtems/score/schedulerpriority.h>
<font color='#880000'>-  #define CONFIGURE_SCHEDULER_ENTRY_PRIORITY { _Scheduler_priority_Initialize }
-  #if !defined(CONFIGURE_SCHEDULER_POLICY)
-    #define CONFIGURE_SCHEDULER_POLICY _Scheduler_PRIORITY
-  #endif
</font><font color='#000088'>+  #define SCHEDULER_ENTRY_POINTS SCHEDULER_PRIORITY_ENTRY_POINTS
</font> 
   /**
    * define the memory used by the priority scheduler
    */
<font color='#880000'>-  #define CONFIGURE_MEMORY_SCHEDULER_PRIORITY ( \
</font><font color='#000088'>+  #define CONFIGURE_MEMORY_FOR_SCHEDULER ( \
</font>     _Configure_From_workspace( \
       ((CONFIGURE_MAXIMUM_PRIORITY+1) * sizeof(Chain_Control)) ) \
   )
<font color='#880000'>-  #define CONFIGURE_MEMORY_PER_TASK_SCHEDULER_PRIORITY ( \
</font><font color='#000088'>+  #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER ( \
</font>     _Configure_From_workspace(sizeof(Scheduler_priority_Per_thread)) )
 #endif
 
 /*<span style="background-color: #FF0000"> </span>
<font color='#880000'>- * Set up the scheduler table.  The scheduling code indexes this table to<span style="background-color: #FF0000"> </span>
- * invoke the correct scheduling implementation. The scheduler to use is<span style="background-color: #FF0000"> </span>
- * 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.
</font><font color='#000088'>+ * Set up the scheduler entry points table.  The scheduling code uses
+ * this code to know which scheduler is configured by the user.
</font>  */
<font color='#880000'>-
-  /**
-   * An empty scheduler entry
-   */
-  #define CONFIGURE_SCHEDULER_NULL { NULL }
-
</font> #ifdef CONFIGURE_INIT
<font color='#880000'>-  /* 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
</font><font color='#000088'>+  Scheduler_Control  _Scheduler = {
+    .Ready_queues.priority = NULL,
+    .Operations            = SCHEDULER_ENTRY_POINTS
</font>   };
 #endif
 
<font color='#880000'>-/**
- * 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 \
-  )
-
</font> /*
  *  If you said the IDLE task was going to do application initialization
  *  and didn't override the IDLE body, then something is amiss.
<font color='#997700'>@@ -2129,7 +2080,6 @@
</font>     CONFIGURE_MAXIMUM_USER_EXTENSIONS,        /* maximum dynamic extensions */
     CONFIGURE_MICROSECONDS_PER_TICK,          /* microseconds per clock tick */
     CONFIGURE_TICKS_PER_TIMESLICE,            /* ticks per timeslice quantum */
<font color='#880000'>-    CONFIGURE_SCHEDULER_POLICY,               /* scheduling policy */
</font>     CONFIGURE_IDLE_TASK_BODY,                 /* user's IDLE task */
     CONFIGURE_IDLE_TASK_STACK_SIZE,           /* IDLE task stack size */
     CONFIGURE_INTERRUPT_STACK_SIZE,           /* interrupt stack size */

<font color='#006600'>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
</font><font color='#997700'>@@ -6,7 +6,7 @@
</font>  *  This include file contains the table of user defined configuration
  *  parameters.
  *
<font color='#880000'>- *  COPYRIGHT (c) 1989-2008.
</font><font color='#000088'>+ *  COPYRIGHT (c) 1989-2011.
</font>  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
<font color='#997700'>@@ -118,10 +118,6 @@
</font>    */
   uint32_t                       ticks_per_timeslice;
 
<font color='#880000'>-  /** This field specifies the scheduling policy to use.
-   */
-  uint32_t                       scheduler_policy;
-
</font>   /** This element points to the BSP's optional idle task which may override
    *  the default one provided with RTEMS.
    */

<font color='#006600'>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
</font><font color='#997700'>@@ -7,6 +7,7 @@
</font> 
 /*
  *  Copyright (C) 2010 Gedare Bloom.
<font color='#000088'>+ *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
</font>  *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
<font color='#997700'>@@ -35,15 +36,6 @@
</font>  */
 /**@{*/
 
<font color='#880000'>-/*
- * 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)
-
</font> typedef struct Scheduler_Control_struct Scheduler_Control;
 
 /*
<font color='#997700'>@@ -54,9 +46,6 @@
</font>   void ( *scheduler_init )( Scheduler_Control * );
 } Scheduler_Table_entry;
 
<font color='#880000'>-/* instantiated and initialized in confdefs.h */
-extern const Scheduler_Table_entry _Scheduler_Table[];
-
</font> /**
  * The following Scheduler_Per_thread_xxx structures are used to
  * hold per-thread data used by the scheduler.  Thread_Control->scheduler is a
<font color='#997700'>@@ -82,26 +71,29 @@
</font>  */
 typedef struct {
   /** Implements the scheduling decision logic (policy). */
<font color='#880000'>-  void ( *schedule ) ( Scheduler_Control * );
</font><font color='#000088'>+  void ( *initialize )(void);
+
+  /** Implements the scheduling decision logic (policy). */
+  void ( *schedule )(void);
</font> 
   /** Voluntarily yields the processor per the scheduling policy. */
<font color='#880000'>-  void ( *yield ) ( Scheduler_Control * );
</font><font color='#000088'>+  void ( *yield )(void);
</font> 
   /** Removes the given thread from scheduling decisions. */
<font color='#880000'>-  void ( *block ) ( Scheduler_Control *, Thread_Control * );
</font><font color='#000088'>+  void ( *block )(Thread_Control *);
</font> 
   /** Adds the given thread to scheduling decisions. */
<font color='#880000'>-  void ( *unblock ) ( Scheduler_Control *, Thread_Control * );
</font><font color='#000088'>+  void ( *unblock )(Thread_Control *);
</font> 
   /** allocates the scheduler field of the given thread */
<font color='#880000'>-  void * ( *scheduler_allocate ) ( Scheduler_Control *, Thread_Control * );
</font><font color='#000088'>+  void * ( *scheduler_allocate )(Thread_Control *);
</font> 
   /** frees the scheduler field of the given thread */
<font color='#880000'>-  void ( *scheduler_free ) ( Scheduler_Control *, Thread_Control * );
</font><font color='#000088'>+  void ( *scheduler_free )(Thread_Control *);
</font> 
   /** updates the scheduler field of the given thread -- primarily used
    * when changing the thread's priority. */
<font color='#880000'>-  void ( *scheduler_update ) ( Scheduler_Control *, Thread_Control * );
</font><font color='#000088'>+  void ( *scheduler_update )(Thread_Control *);
</font> } Scheduler_Operations;
 
 /**
<font color='#997700'>@@ -123,7 +115,7 @@
</font>   } Ready_queues;
 
   /** The jump table for scheduler-specific functions */
<font color='#880000'>-  Scheduler_Operations                  Operations;
</font><font color='#000088'>+  Scheduler_Operations        Operations;
</font> };
 
 /**
<font color='#997700'>@@ -131,8 +123,10 @@
</font>  *  scheduler.
  *
  * @note Can we make this per-cpu? then _Scheduler will be a macro.
<font color='#000088'>+ *
+ * @note This is instantiated and initialized in confdefs.h.
</font>  */
<font color='#880000'>-SCORE_EXTERN Scheduler_Control          _Scheduler;
</font><font color='#000088'>+extern Scheduler_Control  _Scheduler;
</font> 
 /**
  *  This routine initializes the scheduler to the policy chosen by the user

<font color='#006600'>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
</font><font color='#997700'>@@ -7,6 +7,7 @@
</font> 
 /*
  *  Copryight (c) 2010 Gedare Bloom.
<font color='#000088'>+ *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
</font>  *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
<font color='#997700'>@@ -35,11 +36,24 @@
</font> /**@{*/
 
 /**
<font color='#000088'>+ *  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 \
+  }
+
+/**
</font>  * This routine initializes the priority scheduler.
  */
<font color='#880000'>-void _Scheduler_priority_Initialize(
-    Scheduler_Control    *the_scheduler
-);
</font><font color='#000088'>+void _Scheduler_priority_Initialize(void);
</font> 
 /**
  *  This routine removes @a the_thread from the scheduling decision,<span style="background-color: #FF0000"> </span>
<font color='#997700'>@@ -48,32 +62,27 @@
</font>  *  a new heir thread.
  */
 void _Scheduler_priority_Block(<span style="background-color: #FF0000"> </span>
<font color='#880000'>-    Scheduler_Control *the_scheduler,
-    Thread_Control    *the_thread<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+  Thread_Control    *the_thread<span style="background-color: #FF0000"> </span>
</font> );
 
 /**
  *  This kernel routine sets the heir thread to be the next ready thread<span style="background-color: #FF0000"> </span>
  *  by invoking the_scheduler->ready_queue->operations->first().
  */
<font color='#880000'>-void _Scheduler_priority_Schedule(
-    Scheduler_Control *the_scheduler
-);
</font><font color='#000088'>+void _Scheduler_priority_Schedule(void);
</font> 
 /**
  * This routine allocates @a the_thread->scheduler.
  */
 void * _Scheduler_priority_Thread_scheduler_allocate(
<font color='#880000'>-    Scheduler_Control   *the_scheduler,
-    Thread_Control      *the_thread
</font><font color='#000088'>+  Thread_Control      *the_thread
</font> );
 
 /**
  * This routine frees @a the_thread->scheduler.
  */
 void _Scheduler_priority_Thread_scheduler_free(
<font color='#880000'>-    Scheduler_Control   *the_scheduler,
-    Thread_Control      *the_thread
</font><font color='#000088'>+  Thread_Control      *the_thread
</font> );
 
 /**
<font color='#997700'>@@ -81,8 +90,7 @@
</font>  * structures and thread state
  */
 void _Scheduler_priority_Thread_scheduler_update(
<font color='#880000'>-    Scheduler_Control   *the_scheduler,
-    Thread_Control      *the_thread
</font><font color='#000088'>+  Thread_Control      *the_thread
</font> );
 
 /**
<font color='#997700'>@@ -91,17 +99,21 @@
</font>  *  updates any appropriate scheduling variables, for example the heir thread.
  */
 void _Scheduler_priority_Unblock(
<font color='#880000'>-    Scheduler_Control *the_scheduler,
-    Thread_Control    *the_thread<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+  Thread_Control    *the_thread<span style="background-color: #FF0000"> </span>
</font> );
 
 /**
  *  This routine is invoked when a thread wishes to voluntarily
  *  transfer control of the processor to another thread in the queue.
<font color='#000088'>+ *
+ *  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.
</font>  */
<font color='#880000'>-void _Scheduler_priority_Yield(
-    Scheduler_Control *the_scheduler
-);
</font><font color='#000088'>+void _Scheduler_priority_Yield( void );
</font> 
 #ifndef __RTEMS_APPLICATION__
 #include <rtems/score/schedulerpriority.inl>

<font color='#006600'>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
</font><font color='#997700'>@@ -7,6 +7,7 @@
</font> 
 /*
  *  Copyright (C) 2010 Gedare Bloom.
<font color='#000088'>+ *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
</font>  *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
<font color='#997700'>@@ -45,13 +46,11 @@
</font> /** @brief _Scheduler_Schedule
  *
  *  This kernel routine implements the scheduling decision logic for<span style="background-color: #FF0000"> </span>
<font color='#880000'>- *  @a the_scheduler. It does NOT dispatch.
</font><font color='#000088'>+ *  the scheduler. It does NOT dispatch.
</font>  */
<font color='#880000'>-RTEMS_INLINE_ROUTINE void _Scheduler_Schedule(
-    Scheduler_Control *the_scheduler<span style="background-color: #FF0000"> </span>
-)
</font><font color='#000088'>+RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
</font> {
<font color='#880000'>-  the_scheduler->Operations.schedule( the_scheduler );
</font><font color='#000088'>+  _Scheduler.Operations.schedule();
</font> }
 
 /** @brief _Scheduler_Yield
<font color='#997700'>@@ -63,37 +62,35 @@
</font>  */
 RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
 {
<font color='#880000'>-  _Scheduler.Operations.yield( &_Scheduler );
</font><font color='#000088'>+  _Scheduler.Operations.yield();
</font> }
 
 /** @brief _Scheduler_Block
  *
  *  This routine removes @a the_thread from the scheduling decision for<span style="background-color: #FF0000"> </span>
<font color='#880000'>- *  @a the_scheduler. The primary task is to remove the thread from the<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ *  the scheduler. The primary task is to remove the thread from the<span style="background-color: #FF0000"> </span>
</font>  *  ready queue.  It performs any necessary schedulering operations<span style="background-color: #FF0000"> </span>
  *  including the selection of a new heir thread.
  */
 RTEMS_INLINE_ROUTINE void _Scheduler_Block(<span style="background-color: #FF0000"> </span>
<font color='#880000'>-    Scheduler_Control *the_scheduler,
</font>     Thread_Control    *the_thread<span style="background-color: #FF0000"> </span>
 )
 {
<font color='#880000'>-  the_scheduler->Operations.block( the_scheduler, the_thread );
</font><font color='#000088'>+  _Scheduler.Operations.block( the_thread );
</font> }
 
 /** @brief _Scheduler_Unblock
  *
  *  This routine adds @a the_thread to the scheduling decision for<span style="background-color: #FF0000"> </span>
<font color='#880000'>- *  @a the_scheduler.  The primary task is to add the thread to the
</font><font color='#000088'>+ *  the scheduler.  The primary task is to add the thread to the
</font>  *  ready queue per the schedulering policy and update any appropriate<span style="background-color: #FF0000"> </span>
  *  scheduling variables, for example the heir thread.
  */
 RTEMS_INLINE_ROUTINE void _Scheduler_Unblock(
<font color='#880000'>-    Scheduler_Control *the_scheduler,
</font>     Thread_Control    *the_thread<span style="background-color: #FF0000"> </span>
 )
 {
<font color='#880000'>-  the_scheduler->Operations.unblock( the_scheduler, the_thread );
</font><font color='#000088'>+  _Scheduler.Operations.unblock( the_thread );
</font> }
 
 /** @brief _Scheduler_Thread_scheduler_allocate
<font color='#997700'>@@ -101,12 +98,10 @@
</font>  * This routine allocates @a the_thread->scheduler
  */
 RTEMS_INLINE_ROUTINE void* _Scheduler_Thread_scheduler_allocate(<span style="background-color: #FF0000"> </span>
<font color='#880000'>-  Scheduler_Control *the_scheduler,
</font>   Thread_Control    *the_thread
 )
 {
<font color='#880000'>-  return<span style="background-color: #FF0000"> </span>
-    the_scheduler->Operations.scheduler_allocate( the_scheduler, the_thread );
</font><font color='#000088'>+  return _Scheduler.Operations.scheduler_allocate( the_thread );
</font> }
 
 /** @brief _Scheduler_Thread_scheduler_free
<font color='#997700'>@@ -114,11 +109,10 @@
</font>  * This routine frees @a the_thread->scheduler
  */
 RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_free(<span style="background-color: #FF0000"> </span>
<font color='#880000'>-  Scheduler_Control *the_scheduler,
</font>   Thread_Control    *the_thread
 )
 {
<font color='#880000'>-  return the_scheduler->Operations.scheduler_free( the_scheduler, the_thread );
</font><font color='#000088'>+  return _Scheduler.Operations.scheduler_free( the_thread );
</font> }
 
 /** @brief _Scheduler_Thread_scheduler_update
<font color='#997700'>@@ -126,11 +120,10 @@
</font>  * This routine updates @a the_thread->scheduler
  */
 RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_update(<span style="background-color: #FF0000"> </span>
<font color='#880000'>-  Scheduler_Control *the_scheduler,
</font>   Thread_Control    *the_thread
 )
 {
<font color='#880000'>-  the_scheduler->Operations.scheduler_update( the_scheduler, the_thread );
</font><font color='#000088'>+  _Scheduler.Operations.scheduler_update( the_thread );
</font> }
 
 /**@}*/

<font color='#006600'>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
</font><font color='#997700'>@@ -7,6 +7,7 @@
</font> 
 /*
  *  Copyright (C) 2010 Gedare Bloom.
<font color='#000088'>+ *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
</font>  *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
<font color='#997700'>@@ -31,35 +32,28 @@
</font>  *
  *  This routine initializes @a the_ready_queue for priority-based scheduling.
  */
<font color='#880000'>-RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_initialize(
-  Scheduler_Control         *the_scheduler
-) {
</font><font color='#000088'>+RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_initialize(void)
+{
</font>   size_t index;
 
   /* allocate ready queue structures */
<font color='#880000'>-  the_scheduler->Ready_queues.priority = (Chain_Control *)<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+  _Scheduler.Ready_queues.priority = (Chain_Control *)<span style="background-color: #FF0000"> </span>
</font>     _Workspace_Allocate_or_fatal_error(
       ((size_t) PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
     );
 
   /* initialize ready queue structures */
   for( index=0; index <= PRIORITY_MAXIMUM; index++)
<font color='#880000'>-    _Chain_Initialize_empty( &the_scheduler->Ready_queues.priority[index] );
</font><font color='#000088'>+    _Chain_Initialize_empty( &_Scheduler.Ready_queues.priority[index] );
</font> }
 
<font color='#880000'>-/*<span style="background-color: #FF0000"> </span>
- *  _Scheduler_priority_Ready_queue_enqueue
</font><font color='#000088'>+/**
+ *  @brief _Scheduler_priority_Ready_queue_enqueue
</font>  *
  *  This routine puts @a the_thread on to the priority-based ready queue.
  *<span style="background-color: #FF0000">  </span>
<font color='#880000'>- *  Input parameters:
- *    the_thread  - pointer to thread
- *
- *  Output parameters: NONE
- *
- *  INTERRUPT LATENCY:
</font><font color='#000088'>+ *  @param[in] the_thread  - pointer to thread
</font>  */
<font color='#880000'>-
</font> RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue(
   Thread_Control                  *the_thread
 )
<font color='#997700'>@@ -70,21 +64,15 @@
</font>       &the_thread->Object.Node );
 }
 
<font color='#880000'>-/*
- *  _Scheduler_priority_Ready_queue_Enqueue_first
</font><font color='#000088'>+/**
+ *  @brief _Scheduler_priority_Ready_queue_Enqueue_first
</font>  *
  *  This routine puts @a the_thread to the head of the ready queue.<span style="background-color: #FF0000"> </span>
  *  For priority-based ready queues, the thread will be the first thread
  *  at its priority level.
  *<span style="background-color: #FF0000">  </span>
<font color='#880000'>- *  Input parameters:
- *    the_thread      - pointer to thread
- *
- *  Output parameters: NONE
- *
- *  INTERRUPT LATENCY:
</font><font color='#000088'>+ *  @param[in] the_thread  - pointer to thread
</font>  */
<font color='#880000'>-
</font> RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_enqueue_first(
   Thread_Control                   *the_thread
 )
<font color='#997700'>@@ -95,20 +83,14 @@
</font>       &the_thread->Object.Node );
 }
 
<font color='#880000'>-/*
- *  _Scheduler_priority_Ready_queue_extract
</font><font color='#000088'>+/**
+ *  @brief _Scheduler_priority_Ready_queue_extract
</font>  *
  *  This routine removes a specific thread from the specified<span style="background-color: #FF0000"> </span>
  *  priority-based ready queue.
  *
<font color='#880000'>- *  Input parameters:
- *    the_thread       - pointer to a thread control block
- *
- *  Output parameters: NONE
- *
- *  INTERRUPT LATENCY: NONE
</font><font color='#000088'>+ *  @param[in] the_thread  - pointer to thread
</font>  */
<font color='#880000'>-
</font> RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_extract(
   Thread_Control        *the_thread
 )
<font color='#997700'>@@ -122,18 +104,15 @@
</font>     _Chain_Extract_unprotected( &the_thread->Object.Node );
 }
 
<font color='#880000'>-/*
- *  _Scheduler_priority_Ready_queue_first
</font><font color='#000088'>+/**
+ *  @brief _Scheduler_priority_Ready_queue_first
</font>  *
  *  This routines returns a pointer to the first thread on @a the_ready_queue.
  *
<font color='#880000'>- *  Input parameters:
- *    the_ready_queue - pointer to thread queue
</font><font color='#000088'>+ *  @param[in] the_ready_queue - pointer to thread queue
</font>  *
<font color='#880000'>- *  Output parameters:
- *    returns - first thread or NULL
</font><font color='#000088'>+ *  @return This method returns the first thread or NULL
</font>  */
<font color='#880000'>-
</font> RTEMS_INLINE_ROUTINE Thread_Control *_Scheduler_priority_Ready_queue_first(
   Chain_Control       *the_ready_queue
 )
<font color='#997700'>@@ -146,20 +125,14 @@
</font>   return NULL;
 }
 
<font color='#880000'>-/*
- *  _Scheduler_priority_Ready_queue_requeue
</font><font color='#000088'>+/**
+ *  @brief _Scheduler_priority_Ready_queue_requeue
</font>  *
  *  This routine is invoked when a thread changes priority and should be
  *  moved to a different position on the ready queue.
  *
<font color='#880000'>- *  Input parameters:
- *    the_thread        - pointer to a thread control block
- *
- *  Output parameters: NONE
- *
- *  INTERRUPT LATENCY: NONE
</font><font color='#000088'>+ *  @param[in] the_thread  - pointer to thread
</font>  */
<font color='#880000'>-
</font> RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_requeue(
   Thread_Control            *the_thread
 )
<font color='#997700'>@@ -174,47 +147,30 @@
</font>   }
 }
 
<font color='#880000'>-/*
- * _Scheduler_priority_Schedule_body
- *
- * This kernel routine implements scheduling decision logic for priority-based
- * scheduling.<span style="background-color: #FF0000">  </span>
- *
- * Input parameters:
- *   the_scheduler  - pointer to scheduler control
- *   the_thread     - pointer to thread control block
</font><font color='#000088'>+/**
+ *  @brief _Scheduler_priority_Schedule_body
</font>  *
<font color='#880000'>- * Output parameters:  NONE
</font><font color='#000088'>+ *  This kernel routine implements scheduling decision logic
+ *  for priority-based scheduling.<span style="background-color: #FF0000">  </span>
</font>  *
<font color='#880000'>- *  INTERRUPT LATENCY:
</font><font color='#000088'>+ *  @param[in] the_thread  - pointer to thread
</font>  */
<font color='#880000'>-
-RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(
-  Scheduler_Control     *the_scheduler
-)
</font><font color='#000088'>+RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
</font> {
   _Thread_Heir = _Scheduler_priority_Ready_queue_first(
<font color='#880000'>-      the_scheduler->Ready_queues.priority
</font><font color='#000088'>+      _Scheduler.Ready_queues.priority
</font>   );
 }
 
<font color='#880000'>-/*
- * _Scheduler_priority_Block_body
</font><font color='#000088'>+/**
+ *  @brief _Scheduler_priority_Block_body
</font>  *
<font color='#880000'>- * This kernel routine removes the_thread from scheduling decisions based<span style="background-color: #FF0000"> </span>
</font><font color='#000088'>+ *  This kernel routine removes the_thread from scheduling decisions based<span style="background-color: #FF0000"> </span>
</font>  * on simple queue extraction.
  *
<font color='#880000'>- * Input parameters:
- *   the_scheduler  - pointer to scheduler control
- *   the_thread     - pointer to thread control block
- *
- * Output parameters:  NONE
- *
- *  INTERRUPT LATENCY:
</font><font color='#000088'>+ *  @param[in] the_thread  - pointer to thread
</font>  */
<font color='#880000'>-
</font> RTEMS_INLINE_ROUTINE void _Scheduler_priority_Block_body(
<font color='#880000'>-  Scheduler_Control *the_scheduler,
</font>   Thread_Control   *the_thread
 )
 {
<font color='#997700'>@@ -223,7 +179,7 @@
</font>   /* TODO: flash critical section */
 
   if ( _Thread_Is_heir( the_thread ) )
<font color='#880000'>-     _Scheduler_priority_Schedule_body(the_scheduler);
</font><font color='#000088'>+     _Scheduler_priority_Schedule_body();
</font> 
   if ( _Thread_Is_executing( the_thread ) )
     _Thread_Dispatch_necessary = true;
<font color='#997700'>@@ -231,32 +187,22 @@
</font>   return;
 }
 
<font color='#880000'>-/*
- *  _Scheduler_priority_Unblock_body
</font><font color='#000088'>+/**
+ *  @brief _Scheduler_priority_Unblock_body
</font>  *
  *  This kernel routine readies the requested thread according to the queuing<span style="background-color: #FF0000"> </span>
  *  discipline. A new heir thread may be selected.
  *
<font color='#880000'>- *  Input parameters:
- *    the_scheduler - pointer to scheduler control
- *    the_thread    - pointer to thread control block
</font><font color='#000088'>+ *  @param[in] the_thread  - pointer to thread
</font>  *
<font color='#880000'>- *  Output parameters:  NONE
- *
- *  NOTE:  This routine uses the "blocking" heir selection mechanism.
- *         This ensures the correct heir after a thread restart.
- *
- *  INTERRUPT LATENCY:
</font><font color='#000088'>+ *  @note This routine uses the "blocking" heir selection mechanism.
+ *        This ensures the correct heir after a thread restart.
</font>  */
<font color='#880000'>-
</font> RTEMS_INLINE_ROUTINE void _Scheduler_priority_Unblock_body (
<font color='#880000'>-  Scheduler_Control       *the_scheduler __attribute__((unused)),
</font>   Thread_Control          *the_thread
 )
 {
<font color='#880000'>-  _Scheduler_priority_Ready_queue_enqueue(
-      the_thread
-  );
</font><font color='#000088'>+  _Scheduler_priority_Ready_queue_enqueue(the_thread);
</font> 
   /* TODO: flash critical section */
 

<font color='#006600'>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
</font><font color='#997700'>@@ -2,6 +2,7 @@
</font>  *  Scheduler Handler
  *
  *  Copyright (C) 2010 Gedare Bloom.
<font color='#000088'>+ *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
</font>  *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
<font color='#997700'>@@ -27,19 +28,14 @@
</font> /*
  *  _Scheduler_Handler_initialization
  *
<font color='#880000'>- *  This routine initializes the scheduler by calling the scheduler_init<span style="background-color: #FF0000"> </span>
- *  function registered in the Configuration Scheduler Table.
</font><font color='#000088'>+ *  This routine initializes the scheduler by calling the scheduler
+ *  initialize function registered in the Configuration Scheduler Table.
</font>  *
  *  Input parameters: NONE
  *
  *  Output parameters: NONE
  */
<font color='#880000'>-
-void _Scheduler_Handler_initialization( )
</font><font color='#000088'>+void _Scheduler_Handler_initialization(void)
</font> {
<font color='#880000'>-  Scheduler_Control *the_scheduler = &_Scheduler;
-
-  (*(_Scheduler_Table[Configuration.scheduler_policy].scheduler_init))(
-      the_scheduler
-  );
</font><font color='#000088'>+  (*_Scheduler.Operations.initialize)();
</font> }

<font color='#006600'>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
</font><font color='#997700'>@@ -2,6 +2,7 @@
</font>  *  Scheduler Handler
  *
  *  Copyright (C) 2010 Gedare Bloom.
<font color='#000088'>+ *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
</font>  *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
<font color='#997700'>@@ -29,38 +30,8 @@
</font> 
 Priority_bit_map_Control          _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
 
<font color='#880000'>-/*
- *  _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
-)
</font><font color='#000088'>+void _Scheduler_priority_Initialize(void)
</font> {
<font color='#880000'>-  /* the operations table is a jump table to redirect generic scheduler<span style="background-color: #FF0000"> </span>
-   * function calls to scheduler implementation specific functions.  The<span style="background-color: #FF0000"> </span>
-   * main purpose of scheduler initialization is to set up the jump table<span style="background-color: #FF0000"> </span>
-   * 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 =<span style="background-color: #FF0000"> </span>
-      &_Scheduler_priority_Thread_scheduler_allocate;
-  the_scheduler->Operations.scheduler_free     =<span style="background-color: #FF0000"> </span>
-      &_Scheduler_priority_Thread_scheduler_free;
-  the_scheduler->Operations.scheduler_update   =<span style="background-color: #FF0000"> </span>
-      &_Scheduler_priority_Thread_scheduler_update;
-
-  _Scheduler_priority_Ready_queue_initialize( the_scheduler );
</font><font color='#000088'>+  _Scheduler_priority_Ready_queue_initialize();
</font>   _Priority_bit_map_Handler_initialization( );
 }

<font color='#006600'>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
</font><font color='#997700'>@@ -2,6 +2,7 @@
</font>  *  Scheduler Handler
  *
  *  Copyright (C) 2010 Gedare Bloom.
<font color='#000088'>+ *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
</font>  *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
<font color='#997700'>@@ -24,25 +25,9 @@
</font> #include <rtems/score/schedulerpriority.h>
 #include <rtems/score/thread.h>
 
<font color='#880000'>-/*
- * _Scheduler_priority_Block
- *
- * This kernel routine removes the_thread from scheduling decisions based<span style="background-color: #FF0000"> </span>
- * on simple queue extraction.
- *
- * Input parameters:
- *   the_scheduler  - pointer to scheduler control
- *   the_thread     - pointer to thread control block
- *
- * Output parameters:  NONE
- *
- *  INTERRUPT LATENCY:
- */
-
</font> void _Scheduler_priority_Block(
<font color='#880000'>-  Scheduler_Control *the_scheduler,
</font>   Thread_Control   *the_thread
 )
 {
<font color='#880000'>-  _Scheduler_priority_Block_body(the_scheduler, the_thread);
</font><font color='#000088'>+  _Scheduler_priority_Block_body(the_thread);
</font> }

<font color='#006600'>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
</font><font color='#997700'>@@ -2,6 +2,7 @@
</font>  *  Scheduler Handler
  *
  *  Copyright (C) 2010 Gedare Bloom.
<font color='#000088'>+ *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
</font>  *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
<font color='#997700'>@@ -15,34 +16,10 @@
</font> #endif
 
 #include <rtems/system.h>
<font color='#880000'>-#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>
</font> #include <rtems/score/scheduler.h>
 #include <rtems/score/schedulerpriority.h>
<font color='#880000'>-#include <rtems/score/thread.h>
</font> 
<font color='#880000'>-/*
- * _Scheduler_priority_Schedule
- *
- * This kernel routine implements scheduling decision logic for priority-based
- * scheduling.<span style="background-color: #FF0000">  </span>
- *
- * 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
-)
</font><font color='#000088'>+void _Scheduler_priority_Schedule(void)
</font> {
<font color='#880000'>-  _Scheduler_priority_Schedule_body( the_scheduler );
</font><font color='#000088'>+  _Scheduler_priority_Schedule_body();
</font> }

<font color='#006600'>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
</font><font color='#997700'>@@ -16,38 +16,20 @@
</font> 
 #include <rtems/system.h>
 #include <rtems/config.h>
<font color='#880000'>-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
</font> #include <rtems/score/scheduler.h>
 #include <rtems/score/schedulerpriority.h>
<font color='#880000'>-#include <rtems/score/states.h>
</font> #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 
<font color='#880000'>-/*
- *  _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:<span style="background-color: #FF0000"> </span>
- *    Returns pointer to allocated space.
- */
-
-void* _Scheduler_priority_Thread_scheduler_allocate (
-  Scheduler_Control     *the_scheduler __attribute__((unused)),
</font><font color='#000088'>+void *_Scheduler_priority_Thread_scheduler_allocate (
</font>   Thread_Control        *the_thread
 )
 {
<font color='#880000'>-  void                  *sched;
</font><font color='#000088'>+  void  *sched;
</font> 
   sched = _Workspace_Allocate( sizeof(Scheduler_priority_Per_thread) );
 
<font color='#880000'>-  the_thread->scheduler.priority = (Scheduler_priority_Per_thread*) sched;
</font><font color='#000088'>+  the_thread->scheduler.priority = (Scheduler_priority_Per_thread *) sched;
</font> 
   return sched;
 }

<font color='#006600'>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
</font><font color='#997700'>@@ -2,6 +2,7 @@
</font>  *  Scheduler Handler
  *
  *  Copyright (C) 2010 Gedare Bloom.
<font color='#000088'>+ *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
</font>  *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
<font color='#997700'>@@ -25,21 +26,8 @@
</font> #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 
<font color='#880000'>-/*
- *  _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
- */
-
</font> void _Scheduler_priority_Thread_scheduler_free (
<font color='#880000'>-    Scheduler_Control *the_scheduler __attribute__((unused)),
-    Thread_Control    *the_thread
</font><font color='#000088'>+  Thread_Control    *the_thread
</font> )
 {
   _Workspace_Free( the_thread->scheduler.priority );

<font color='#006600'>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
</font><font color='#997700'>@@ -2,6 +2,7 @@
</font>  *  Scheduler Handler
  *
  *  Copyright (C) 2010 Gedare Bloom.
<font color='#000088'>+ *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
</font>  *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
<font color='#997700'>@@ -16,34 +17,18 @@
</font> 
 #include <rtems/system.h>
 #include <rtems/config.h>
<font color='#880000'>-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
</font> #include <rtems/score/priority.h>
 #include <rtems/score/prioritybitmap.h>
 #include <rtems/score/scheduler.h>
 #include <rtems/score/schedulerpriority.h>
<font color='#880000'>-#include <rtems/score/states.h>
</font> #include <rtems/score/thread.h>
 
<font color='#880000'>-/*
- *  _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
</font><font color='#000088'>+void _Scheduler_priority_Thread_scheduler_update(
+  Thread_Control    *the_thread
</font> )
 {
<font color='#880000'>-  Chain_Control *rq = the_scheduler->Ready_queues.priority;
</font><font color='#000088'>+  Chain_Control *rq = _Scheduler.Ready_queues.priority;
+
</font>   the_thread->scheduler.priority->ready_chain = &rq[
     the_thread->current_priority<span style="background-color: #FF0000"> </span>
   ];

<font color='#006600'>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
</font><font color='#997700'>@@ -2,6 +2,7 @@
</font>  *  Scheduler Handler
  *
  *  Copyright (C) 2010 Gedare Bloom.
<font color='#000088'>+ *  Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
</font>  *
  *  The license and distribution terms for this file may be
  *  found in the file LICENSE in this distribution or at
<font color='#997700'>@@ -15,43 +16,12 @@
</font> #endif
 
 #include <rtems/system.h>
<font color='#880000'>-#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>
</font> #include <rtems/score/scheduler.h>
 #include <rtems/score/schedulerpriority.h>
<font color='#880000'>-#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<span style="background-color: #FF0000"> </span>
- *  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:
- */
</font> 
 void _Scheduler_priority_Unblock (
<font color='#880000'>-  Scheduler_Control       *the_scheduler,
</font>   Thread_Control          *the_thread
 )
 {
<font color='#880000'>-  _Scheduler_priority_Unblock_body(the_scheduler, the_thread);
</font><font color='#000088'>+  _Scheduler_priority_Unblock_body(the_thread);
</font> }

<font color='#006600'>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
</font><font color='#997700'>@@ -30,28 +30,12 @@
</font> #include <rtems/score/wkspace.h>
 
 /*
<font color='#880000'>- *  _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
- *
</font>  *  INTERRUPT LATENCY:
  *    ready chain
  *    select heir
  */
 
<font color='#880000'>-void _Scheduler_priority_Yield(<span style="background-color: #FF0000"> </span>
-    Scheduler_Control   *the_scheduler __attribute__((unused))
-)
</font><font color='#000088'>+void _Scheduler_priority_Yield(void)
</font> {
   ISR_Level       level;
   Thread_Control *executing;

<font color='#006600'>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
</font><font color='#997700'>@@ -17,39 +17,11 @@
</font> #endif
 
 #include <rtems/system.h>
<font color='#880000'>-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
</font> #include <rtems/score/isr.h>
<font color='#880000'>-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
</font> #include <rtems/score/scheduler.h>
 #include <rtems/score/schedulerpriority.h>
<font color='#880000'>-#include <rtems/score/states.h>
-#include <rtems/score/sysstate.h>
</font> #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
<font color='#880000'>-#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
- */
</font> 
 void _Thread_Change_priority(
   Thread_Control   *the_thread,
<font color='#997700'>@@ -137,7 +109,7 @@
</font>    *  We altered the set of thread priorities.  So let's figure out
    *  who is the heir and if we need to switch to them.
    */
<font color='#880000'>-  _Scheduler_Schedule(&_Scheduler);
</font><font color='#000088'>+  _Scheduler_Schedule();
</font> 
   if ( !_Thread_Is_executing_also_the_heir() &&
        _Thread_Executing->is_preemptible )

<font color='#006600'>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
</font><font color='#997700'>@@ -1,8 +1,7 @@
</font> /*
<font color='#880000'>- *  Thread Handler
</font><font color='#000088'>+ *  Thread Handler / Thread Clear State
</font>  *
<font color='#880000'>- *
- *  COPYRIGHT (c) 1989-1999.
</font><font color='#000088'>+ *  COPYRIGHT (c) 1989-2011.
</font>  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
<font color='#997700'>@@ -31,26 +30,11 @@
</font> #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
 
<font color='#880000'>-/*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
- *
</font><font color='#000088'>+/*
</font>  *  INTERRUPT LATENCY:
  *    priority map
  *    select heir
  */
<font color='#880000'>-
-
</font> void _Thread_Clear_state(
   Thread_Control *the_thread,
   States_Control  state
<font color='#997700'>@@ -67,7 +51,7 @@
</font>       the_thread->current_state = _States_Clear( state, current_state );
 
       if ( _States_Is_ready( current_state ) ) {
<font color='#880000'>-        _Scheduler_Unblock( &_Scheduler, the_thread);
</font><font color='#000088'>+        _Scheduler_Unblock( the_thread );
</font>       }
   }
   _ISR_Enable( level );

<font color='#006600'>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
</font><font color='#997700'>@@ -1,8 +1,7 @@
</font> /*
<font color='#880000'>- *  Thread Handler
</font><font color='#000088'>+ *  Thread Handler / Thread Close
</font>  *
<font color='#880000'>- *
- *  COPYRIGHT (c) 1989-2008.
</font><font color='#000088'>+ *  COPYRIGHT (c) 1989-2011.
</font>  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
<font color='#997700'>@@ -31,16 +30,6 @@
</font> #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
 
<font color='#880000'>-/*
- *  _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.
- */
-
</font> void _Thread_Close(
   Objects_Information  *information,
   Thread_Control       *the_thread
<font color='#997700'>@@ -89,7 +78,7 @@
</font>   /*
    * Free the per-thread scheduling information.
    */
<font color='#880000'>-  _Scheduler_Thread_scheduler_free( &_Scheduler, the_thread );
</font><font color='#000088'>+  _Scheduler_Thread_scheduler_free( the_thread );
</font> 
   /*
    *  The thread might have been FP.  So deal with that.

<font color='#006600'>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
</font><font color='#997700'>@@ -1,8 +1,7 @@
</font> /*
<font color='#880000'>- *  Thread Handler
</font><font color='#000088'>+ *  Thread Handler / Thread Initialize
</font>  *
<font color='#880000'>- *
- *  COPYRIGHT (c) 1989-2009.
</font><font color='#000088'>+ *  COPYRIGHT (c) 1989-2011.
</font>  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
<font color='#997700'>@@ -194,7 +193,7 @@
</font>   the_thread->resource_count          = 0;
   the_thread->real_priority           = priority;
   the_thread->Start.initial_priority  = priority;
<font color='#880000'>-  sched =_Scheduler_Thread_scheduler_allocate( &_Scheduler, the_thread );
</font><font color='#000088'>+  sched =_Scheduler_Thread_scheduler_allocate( the_thread );
</font>   if ( !sched )
     goto failed;
   _Thread_Set_priority( the_thread, priority );

<font color='#006600'>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
</font><font color='#997700'>@@ -1,8 +1,7 @@
</font> /*
<font color='#880000'>- *  Thread Handler
</font><font color='#000088'>+ *  Thread Handler / Thread Ready
</font>  *
<font color='#880000'>- *
- *  COPYRIGHT (c) 1989-2006.
</font><font color='#000088'>+ *  COPYRIGHT (c) 1989-2011.
</font>  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
<font color='#997700'>@@ -31,26 +30,11 @@
</font> #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
 
<font color='#880000'>-/*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.
- *
</font><font color='#000088'>+/*
</font>  *  INTERRUPT LATENCY:
  *    ready chain
  *    select heir
  */
<font color='#880000'>-
</font> void _Thread_Ready(
   Thread_Control *the_thread
 )
<font color='#997700'>@@ -61,7 +45,7 @@
</font> 
   the_thread->current_state = STATES_READY;
 
<font color='#880000'>-  _Scheduler_Unblock( &_Scheduler, the_thread );
</font><font color='#000088'>+  _Scheduler_Unblock( the_thread );
</font> 
   _ISR_Enable( level );
 }

<font color='#006600'>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
</font><font color='#997700'>@@ -1,8 +1,8 @@
</font> /*
<font color='#880000'>- *  Thread Handler
</font><font color='#000088'>+ *  Thread Handler / Thread Resume
</font>  *
  *
<font color='#880000'>- *  COPYRIGHT (c) 1989-1999.
</font><font color='#000088'>+ *  COPYRIGHT (c) 1989-2011.
</font>  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
<font color='#997700'>@@ -31,27 +31,11 @@
</font> #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
 
<font color='#880000'>-/*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
- *
</font><font color='#000088'>+/*
</font>  *  INTERRUPT LATENCY:
  *    priority map
  *    select heir
  */
<font color='#880000'>-
-
</font> void _Thread_Resume(
   Thread_Control   *the_thread,
   bool              force
<font color='#997700'>@@ -69,7 +53,7 @@
</font>     the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
 
     if ( _States_Is_ready( current_state ) ) {
<font color='#880000'>-      _Scheduler_Unblock( &_Scheduler, the_thread );
</font><font color='#000088'>+      _Scheduler_Unblock( the_thread );
</font>     }
   }
 

<font color='#006600'>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
</font><font color='#997700'>@@ -1,8 +1,7 @@
</font> /*
<font color='#880000'>- *  Thread Handler
</font><font color='#000088'>+ *  Thread Handler / Thread Set Priority
</font>  *
<font color='#880000'>- *
- *  COPYRIGHT (c) 1989-1999.
</font><font color='#000088'>+ *  COPYRIGHT (c) 1989-2011.
</font>  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
<font color='#997700'>@@ -31,20 +30,6 @@
</font> #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
 
<font color='#880000'>-/*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
- */
-
</font> void _Thread_Set_priority(
   Thread_Control   *the_thread,
   Priority_Control  new_priority
<font color='#997700'>@@ -52,5 +37,5 @@
</font> {
   the_thread->current_priority = new_priority;
 
<font color='#880000'>-  _Scheduler_Thread_scheduler_update(&_Scheduler, the_thread);
</font><font color='#000088'>+  _Scheduler_Thread_scheduler_update( the_thread );
</font> }

<font color='#006600'>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
</font><font color='#997700'>@@ -1,8 +1,7 @@
</font> /*
<font color='#880000'>- *  Thread Handler
</font><font color='#000088'>+ *  Thread Handler / Thread Set State
</font>  *
<font color='#880000'>- *
- *  COPYRIGHT (c) 1989-1999.
</font><font color='#000088'>+ *  COPYRIGHT (c) 1989-2011.
</font>  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
<font color='#997700'>@@ -31,24 +30,11 @@
</font> #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
 
<font color='#880000'>-/*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
- *
</font><font color='#000088'>+/*
</font>  *  INTERRUPT LATENCY:
  *    ready chain
  *    select map
  */
<font color='#880000'>-
</font> void _Thread_Set_state(
   Thread_Control *the_thread,
   States_Control  state
<font color='#997700'>@@ -66,7 +52,7 @@
</font> 
   the_thread->current_state = state;
 
<font color='#880000'>-  _Scheduler_Block( &_Scheduler, the_thread);
</font><font color='#000088'>+  _Scheduler_Block( the_thread );
</font> 
   _ISR_Enable( level );
 }

<font color='#006600'>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
</font><font color='#997700'>@@ -1,8 +1,8 @@
</font> /*
<font color='#880000'>- *  Thread Handler
</font><font color='#000088'>+ *  Thread Handler / Thread Suspend
</font>  *
  *
<font color='#880000'>- *  COPYRIGHT (c) 1989-1999.
</font><font color='#000088'>+ *  COPYRIGHT (c) 1989-2011.
</font>  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
<font color='#997700'>@@ -31,23 +31,10 @@
</font> #include <rtems/score/userext.h>
 #include <rtems/score/wkspace.h>
 
<font color='#880000'>-/*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:
</font><font color='#000088'>+/*  INTERRUPT LATENCY:
</font>  *    ready chain
  *    select map
  */
<font color='#880000'>-
</font> void _Thread_Suspend(
   Thread_Control   *the_thread
 )
<font color='#997700'>@@ -64,7 +51,7 @@
</font> 
   the_thread->current_state = STATES_SUSPENDED;
 
<font color='#880000'>-  _Scheduler_Block(&_Scheduler, the_thread);
</font><font color='#000088'>+  _Scheduler_Block( the_thread );
</font> 
   _ISR_Enable( level );
 }
</pre>
<p> </p>
<a name='cs2'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-02-17 Joel Sherrill <joel.sherrill@oarcorp.com>

        * user/conf.t: Document changes to Scheduler configuration.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/doc/ChangeLog.diff?r1=text&tr1=1.296&r2=text&tr2=1.297&diff_format=h">M</a></td><td width='1%'>1.297</td><td width='100%'>doc/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/doc/user/conf.t.diff?r1=text&tr1=1.66&r2=text&tr2=1.67&diff_format=h">M</a></td><td width='1%'>1.67</td><td width='100%'>doc/user/conf.t</td></tr>
</table>
<pre>
<font color='#006600'>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
</font><font color='#997700'>@@ -1,3 +1,7 @@
</font><font color='#000088'>+2011-02-17    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * user/conf.t: Document changes to Scheduler configuration.
+
</font> 2011-02-02        Ralf Cors├ępius <ralf.corsepius@rtems.org>
 
        * configure.ac: Require autoconf-2.68, automake-1.11.1.

<font color='#006600'>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
</font><font color='#997700'>@@ -394,50 +394,52 @@
</font> @c
 @c
 @subsection Scheduler Algorithm Configuration
<font color='#000088'>+
</font> This section defines the configuration parameters related to selecting<span style="background-color: #FF0000"> </span>
<font color='#880000'>-a scheduling algorithm for an application.  Regardless of whether<span style="background-color: #FF0000"> </span>
-@code{CONFIGURE_SCHEDULER_POLICY} is defined, if none of the other<span style="background-color: #FF0000"> </span>
-configuration parameters are set, then @code{rtems/confdefs.h} will define<span style="background-color: #FF0000"> </span>
-@code{CONFIGURE_SCHEDULER_PRIORITY} and will (re)define<span style="background-color: #FF0000"> </span>
-@code{CONFIGURE_SCHEDULER_POLICY} as @code{_Scheduler_Priority}. That is,<span style="background-color: #FF0000"> </span>
-@code{CONFIGURE_SCHEDULER_PRIORITY} is the default scheduling algorithm.
</font><font color='#000088'>+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:
</font> 
 @itemize @bullet
<font color='#880000'>-@findex CONFIGURE_SCHEDULER_POLICY
-@item @code{CONFIGURE_SCHEDULER_POLICY} is defined to specify which<span style="background-color: #FF0000"> </span>
-scheduling algorithm an application will use.  If it is undefined,<span style="background-color: #FF0000"> </span>
-then @code{rtems/confdefs.h} will define it based on the definition<span style="background-color: #FF0000"> </span>
-of the following configuration parameters.
-Valid values for this configuration parameter are:<span style="background-color: #FF0000"> </span>
-@code{_Scheduler_USER},
-@code{_Scheduler_Priority}.
</font><font color='#000088'>+
+@findex CONFIGURE_SCHEDULER_PRIORITY
+@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}.
+
+@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.<span style="background-color: #FF0000">  </span>
</font> 
 @findex CONFIGURE_SCHEDULER_USER
<font color='#880000'>-@item @code{CONFIGURE_SCHEDULER_USER} is defined if the application<span style="background-color: #FF0000"> </span>
-provides its own scheduling algorithm. If @code{CONFIGURE_SCHEDULER_USER} is<span style="background-color: #FF0000"> </span>
-defined then @code{CONFIGURE_SCHEDULER_ENTRY_USER} must be defined with the<span style="background-color: #FF0000"> </span>
-name of the application's initialization function.  If both<span style="background-color: #FF0000"> </span>
-configuration parameters are defined and @code{CONFIGURE_SCHEDULER_POLICY}<span style="background-color: #FF0000"> </span>
-is undefined, then @code{CONFIGURE_SCHEDULER_POLICY} will be be defined as<span style="background-color: #FF0000"> </span>
-@code{_Scheduler_USER}.
-
-@findex CONFIGURE_SCHEDULER_ALL
-@item @code{CONFIGURE_SCHEDULER_ALL} is defined if the application<span style="background-color: #FF0000"> </span>
-chooses to include all of the RTEMS-provided schedulers.<span style="background-color: #FF0000">  </span>
-@code{CONFIGURE_SCHEDULER_ALL} will define all of the following configuration<span style="background-color: #FF0000"> </span>
-parameters and will use @code{CONFIGURE_SCHEDULER_POLICY} to select the<span style="background-color: #FF0000"> </span>
-algorithm to use. If @code{CONFIGURE_SCHEDULER_POLICY} is not defined, then<span style="background-color: #FF0000"> </span>
-@code{rtems/confdefs.h} will define it as @code{_Scheduler_Priority}.
</font><font color='#000088'>+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:
</font> 
<font color='#880000'>-@findex CONFIGURE_SCHEDULER_PRIORITY
-@item @code{CONFIGURE_SCHEDULER_PRIORITY} is defined if the application<span style="background-color: #FF0000"> </span>
-will use the Priority Scheduling algorithm.
-If none of the previous configuration parameters are defined by the<span style="background-color: #FF0000"> </span>
-application, then @code{rtems/confdefs.h} will define<span style="background-color: #FF0000"> </span>
-@code{CONFIGURE_SCHEDULER_POLICY} as @code{_Scheduler_PRIORITY}.
</font><font color='#000088'>+@itemize @bullet
+@item @code{CONFIGURE_SCHEDULER_USER_ENTRY_POINTS} must be defined with the set of methods which implement this scheduler.<span style="background-color: #FF0000">  </span>
+
+@item @code{CONFIGURE_MEMORY_FOR_SCHEDULER} must be defined with the
+amount of memory required as a base amount for the scheduler.
+
+@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.
</font> 
 @end itemize
 
<font color='#000088'>+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
+@code{cpukit/sapi/include/confdefs.h} for how these are defined for the
+Deterministic Priority Scheduler.
+
</font> @c
 @c
 @c
</pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>