<!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-07-29)</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>jennifer</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-07-29 Jennifer Averett <Jennifer.Averett@OARcorp.com>

        * smp03/init.c, smp03/system.h, smp03/tasks.c: Modified test to force a
        task to run prior to starting the next task. This allows the last
        task to always preempt, where if the tasks started in an odd order
        the last task could run prior the the task it was supposed to
        preempt.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/smptests/ChangeLog.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%'>testsuites/smptests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/smptests/smp03/init.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%'>testsuites/smptests/smp03/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/smptests/smp03/system.h.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%'>testsuites/smptests/smp03/system.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/smptests/smp03/tasks.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%'>testsuites/smptests/smp03/tasks.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/smptests/ChangeLog:1.4 rtems/testsuites/smptests/ChangeLog:1.5
--- rtems/testsuites/smptests/ChangeLog:1.4     Fri Jul 29 07:29:33 2011
+++ rtems/testsuites/smptests/ChangeLog Fri Jul 29 13:14:49 2011
</font><font color='#997700'>@@ -1,5 +1,13 @@
</font> 2011-07-29        Jennifer Averett <Jennifer.Averett@OARcorp.com>
 
<font color='#000088'>+   * smp03/init.c, smp03/system.h, smp03/tasks.c: Modified test to force a
+       task to run prior to starting the next task. This allows the last
+       task to always preempt, where if the tasks started in an odd order
+       the last task could run prior the the task it was supposed to
+       preempt.
+
+2011-07-29     Jennifer Averett <Jennifer.Averett@OARcorp.com>
+
</font>   * smp01/init.c, smp02/init.c, smp02/tasks.c, smp03/init.c,
        smp03/tasks.c, smp04/Makefile.am, smp04/init.c, smp05/init.c,
        smp06/init.c, smp07/init.c, smp08/init.c: Cleaned up tests and fixed

<font color='#006600'>diff -u rtems/testsuites/smptests/smp03/init.c:1.2 rtems/testsuites/smptests/smp03/init.c:1.3
--- rtems/testsuites/smptests/smp03/init.c:1.2  Fri Jul 29 07:29:34 2011
+++ rtems/testsuites/smptests/smp03/init.c      Fri Jul 29 13:14:49 2011
</font><font color='#997700'>@@ -49,6 +49,11 @@
</font> 
   locked_printf( "\n\n***  SMP03 TEST ***\n" );
 
<font color='#000088'>+  /* Initialize the TaskRan array */
+  TaskRan[0] = true;
+  for ( i=1; i<rtems_smp_get_number_of_processors() ; i++ ) {
+    TaskRan[i] = false;
+  }
</font> 
   /* Show that the init task is running on this cpu */
   PrintTaskInfo( "Init" );
<font color='#997700'>@@ -67,8 +72,12 @@
</font>       &id
     );
     status = rtems_task_start( id, Test_task, i );
<font color='#880000'>-
-    Loop();
</font><font color='#000088'>+<span style="background-color: #FF0000">    </span>
+    /* Allow task to start before starting next task.
+     * This is necessary on some simulators.
+     */<span style="background-color: #FF0000"> </span>
+    while (TaskRan[i] == false)
+      ;
</font>   }
 
   /* Create/Start an aditional task with the highest priority */
<font color='#997700'>@@ -80,16 +89,20 @@
</font>     RTEMS_DEFAULT_ATTRIBUTES,
     &id
   );
<font color='#880000'>-  TestFinished = false;
</font>   status = rtems_task_start(id,Test_task,rtems_smp_get_number_of_processors());
 
<font color='#880000'>-  /* Wait on the last task to run */
-  while(!TestFinished)
-    ;
-
-  /* End the test */
-  Loop();
-  locked_printf( "*** END OF TEST SMP03 ***\n" );
-  Loop();
</font><font color='#000088'>+  /* Wait on all tasks to run */
+  while (1) {
+    TestFinished = true;
+    for ( i=1; i < (rtems_smp_get_number_of_processors()+1) ; i++ ) {
+      if (TaskRan[i] == false)
+        TestFinished = false;
+    }
+    if (TestFinished) {
+      locked_printf( "*** END OF TEST SMP03 ***\n" );
+      rtems_test_exit( 0 );
+    }
+  }
+
</font>   rtems_test_exit( 0 );<span style="background-color: #FF0000">    </span>
 }

<font color='#006600'>diff -u rtems/testsuites/smptests/smp03/system.h:1.1 rtems/testsuites/smptests/smp03/system.h:1.2
--- rtems/testsuites/smptests/smp03/system.h:1.1        Tue Jun 28 16:08:47 2011
+++ rtems/testsuites/smptests/smp03/system.h    Fri Jul 29 13:14:49 2011
</font><font color='#997700'>@@ -50,6 +50,12 @@
</font> /*
  *  Keep the names and IDs in global variables so another task can use them.
  */
<font color='#000088'>+
+TEST_EXTERN volatile bool TaskRan[ CONFIGURE_SMP_MAXIMUM_PROCESSORS + 1 ];
+
+/*
+ *  Keep the names and IDs in global variables so another task can use them.
+ */
</font> void Loop(void);
 void PrintTaskInfo(
   const char *task_name

<font color='#006600'>diff -u rtems/testsuites/smptests/smp03/tasks.c:1.2 rtems/testsuites/smptests/smp03/tasks.c:1.3
--- rtems/testsuites/smptests/smp03/tasks.c:1.2 Fri Jul 29 07:29:34 2011
+++ rtems/testsuites/smptests/smp03/tasks.c     Fri Jul 29 13:14:49 2011
</font><font color='#997700'>@@ -25,12 +25,7 @@
</font>   sprintf( task_name, "TA%" PRIu32, task_index );
   PrintTaskInfo( task_name );
 
<font color='#880000'>-  /* If this is the last task created set a flag for the
-   * test to end.
-   */
-  if ( task_index  == rtems_smp_get_number_of_processors() ) {
-    TestFinished = true;
-  }
</font><font color='#000088'>+  TaskRan[task_index] = true;
</font> 
   /* Wait for the test to end without giving up this processor */
   while(1)
</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>