<!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 (2010-07-26)</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>2010-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com>
* rtems/src/ratemonperiod.c: Use if not switch since all cases of enum
are not valid and switch was generating dead code.
</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.2519&r2=text&tr2=1.2520&diff_format=h">M</a></td><td width='1%'>1.2520</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/rtems/src/ratemonperiod.c.diff?r1=text&tr1=1.27&r2=text&tr2=1.28&diff_format=h">M</a></td><td width='1%'>1.28</td><td width='100%'>cpukit/rtems/src/ratemonperiod.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2519 rtems/cpukit/ChangeLog:1.2520
--- rtems/cpukit/ChangeLog:1.2519 Sun Jul 25 10:13:35 2010
+++ rtems/cpukit/ChangeLog Mon Jul 26 08:49:01 2010
</font><font color='#997700'>@@ -1,3 +1,8 @@
</font><font color='#000088'>+2010-07-26 Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+ * rtems/src/ratemonperiod.c: Use if not switch since all cases of enum
+ are not valid and switch was generating dead code.
+
</font> 2010-07-25 Joel Sherrill <joel.sherrill@oarcorp.com>
* sapi/include/rtems/init.h: Mark rtems_shutdown_executive as a
<font color='#006600'>diff -u rtems/cpukit/rtems/src/ratemonperiod.c:1.27 rtems/cpukit/rtems/src/ratemonperiod.c:1.28
--- rtems/cpukit/rtems/src/ratemonperiod.c:1.27 Tue Dec 15 12:26:41 2009
+++ rtems/cpukit/rtems/src/ratemonperiod.c Mon Jul 26 08:49:01 2010
</font><font color='#997700'>@@ -1,7 +1,7 @@
</font> /*
* Rate Monotonic Manager - Period Blocking and Status
*
<font color='#880000'>- * COPYRIGHT (c) 1989-2009.
</font><font color='#000088'>+ * COPYRIGHT (c) 1989-2010.
</font> * On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
<font color='#997700'>@@ -280,94 +280,89 @@
</font> }
_ISR_Disable( level );
<font color='#880000'>- switch ( the_period->state ) {
- case RATE_MONOTONIC_INACTIVE: {
</font><font color='#000088'>+ if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
+ _ISR_Enable( level );
</font>
<font color='#880000'>- _ISR_Enable( level );
</font><font color='#000088'>+ /*
+ * Baseline statistics information for the beginning of a period.
+ */
+ _Rate_monotonic_Initiate_statistics( the_period );
+
+ the_period->state = RATE_MONOTONIC_ACTIVE;
+ _Watchdog_Initialize(
+ &the_period->Timer,
+ _Rate_monotonic_Timeout,
+ id,
+ NULL
+ );
</font>
<font color='#880000'>- /*
- * Baseline statistics information for the beginning of a period.
- */
- _Rate_monotonic_Initiate_statistics( the_period );
</font><font color='#000088'>+ the_period->next_length = length;
</font>
<font color='#880000'>- the_period->state = RATE_MONOTONIC_ACTIVE;
- _Watchdog_Initialize(
- &the_period->Timer,
- _Rate_monotonic_Timeout,
- id,
- NULL
- );
-
- the_period->next_length = length;
-
- _Watchdog_Insert_ticks( &the_period->Timer, length );
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- }
- case RATE_MONOTONIC_ACTIVE:
</font><font color='#000088'>+ _Watchdog_Insert_ticks( &the_period->Timer, length );
+ _Thread_Enable_dispatch();
+ return RTEMS_SUCCESSFUL;
+ }
</font>
<font color='#880000'>- /*
- * Update statistics from the concluding period.
- */
- _Rate_monotonic_Update_statistics( the_period );
-
- /*
- * This tells the _Rate_monotonic_Timeout that this task is
- * in the process of blocking on the period and that we
- * may be changing the length of the next period.
- */
- the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
- the_period->next_length = length;
-
- _ISR_Enable( level );
-
- _Thread_Executing->Wait.id = the_period->Object.id;
- _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
-
- /*
- * Did the watchdog timer expire while we were actually blocking
- * on it?
- */
- _ISR_Disable( level );
- local_state = the_period->state;
- the_period->state = RATE_MONOTONIC_ACTIVE;
- _ISR_Enable( level );
-
- /*
- * If it did, then we want to unblock ourself and continue as
- * if nothing happen. The period was reset in the timeout routine.
- */
- if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
- _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
-
- _Thread_Enable_dispatch();
- return RTEMS_SUCCESSFUL;
- break;
-
- case RATE_MONOTONIC_EXPIRED:
-
- /*
- * Update statistics from the concluding period
- */
- _Rate_monotonic_Update_statistics( the_period );
</font><font color='#000088'>+ if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
+ /*
+ * Update statistics from the concluding period.
+ */
+ _Rate_monotonic_Update_statistics( the_period );
+
+ /*
+ * This tells the _Rate_monotonic_Timeout that this task is
+ * in the process of blocking on the period and that we
+ * may be changing the length of the next period.
+ */
+ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
+ the_period->next_length = length;
+
+ _ISR_Enable( level );
+
+ _Thread_Executing->Wait.id = the_period->Object.id;
+ _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
+
+ /*
+ * Did the watchdog timer expire while we were actually blocking
+ * on it?
+ */
+ _ISR_Disable( level );
+ local_state = the_period->state;
+ the_period->state = RATE_MONOTONIC_ACTIVE;
+ _ISR_Enable( level );
</font>
<font color='#880000'>- _ISR_Enable( level );
</font><font color='#000088'>+ /*
+ * If it did, then we want to unblock ourself and continue as
+ * if nothing happen. The period was reset in the timeout routine.
+ */
+ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
+ _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
</font>
<font color='#880000'>- the_period->state = RATE_MONOTONIC_ACTIVE;
- the_period->next_length = length;
</font><font color='#000088'>+ _Thread_Enable_dispatch();
+ return RTEMS_SUCCESSFUL;
+ }
</font>
<font color='#880000'>- _Watchdog_Insert_ticks( &the_period->Timer, length );
- _Thread_Enable_dispatch();
- return RTEMS_TIMEOUT;
-
- case RATE_MONOTONIC_OWNER_IS_BLOCKING:
- case RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING:
- /*
- * These should never happen.
- */
- break;
</font><font color='#000088'>+ if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
+ /*
+ * Update statistics from the concluding period
+ */
+ _Rate_monotonic_Update_statistics( the_period );
+
+ _ISR_Enable( level );
+
+ the_period->state = RATE_MONOTONIC_ACTIVE;
+ the_period->next_length = length;
+
+ _Watchdog_Insert_ticks( &the_period->Timer, length );
+ _Thread_Enable_dispatch();
+ return RTEMS_TIMEOUT;
</font> }
<font color='#000088'>+ /*
+ * These should never happen so just return invalid Id.
+ * - RATE_MONOTONIC_OWNER_IS_BLOCKING:
+ * - RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING:
+ */
</font> #if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* should never return this */
#endif
</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>