<!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-06-24)</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-06-24 Gedare Bloom <giddyup44@yahoo.com>

        PR 1590/cpukit
        * score/Makefile.am, score/include/rtems/score/thread.h,
        score/src/threadtickletimeslice.c: Remove _Thread_Reset_timeslice and
        replaces its single use with a call to the functionally equivalent
        _Thread_Yield_processor().
        * score/src/threadresettimeslice.c: Removed.
</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.2457&r2=text&tr2=1.2458&diff_format=h">M</a></td><td width='1%'>1.2458</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/Makefile.am.diff?r1=text&tr1=1.81&r2=text&tr2=1.82&diff_format=h">M</a></td><td width='1%'>1.82</td><td width='100%'>cpukit/score/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/include/rtems/score/thread.h.diff?r1=text&tr1=1.93&r2=text&tr2=1.94&diff_format=h">M</a></td><td width='1%'>1.94</td><td width='100%'>cpukit/score/include/rtems/score/thread.h</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/threadresettimeslice.c?rev=1.5&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.5</font></td><td width='100%'><font color="#880000">cpukit/score/src/threadresettimeslice.c</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/score/src/threadtickletimeslice.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/threadtickletimeslice.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2457 rtems/cpukit/ChangeLog:1.2458
--- rtems/cpukit/ChangeLog:1.2457       Thu Jun 24 14:57:58 2010
+++ rtems/cpukit/ChangeLog      Thu Jun 24 16:27:29 2010
</font><font color='#997700'>@@ -1,3 +1,12 @@
</font><font color='#000088'>+2010-06-24    Gedare Bloom <giddyup44@yahoo.com>
+
+       PR 1590/cpukit
+       * score/Makefile.am, score/include/rtems/score/thread.h,
+       score/src/threadtickletimeslice.c: Remove _Thread_Reset_timeslice and
+       replaces its single use with a call to the functionally equivalent
+       _Thread_Yield_processor().
+       * score/src/threadresettimeslice.c: Removed.
+
</font> 2010-06-24        Bharath Suri <bharath.s.jois@gmail.com>
 
        PR 1542/filesystem

<font color='#006600'>diff -u rtems/cpukit/score/Makefile.am:1.81 rtems/cpukit/score/Makefile.am:1.82
--- rtems/cpukit/score/Makefile.am:1.81 Thu Jun 17 10:29:44 2010
+++ rtems/cpukit/score/Makefile.am      Thu Jun 24 16:27:30 2010
</font><font color='#997700'>@@ -143,9 +143,9 @@
</font>     src/threadclearstate.c src/threadclose.c src/threadcreateidle.c \
     src/threaddelayended.c src/threaddispatch.c src/threadevaluatemode.c \
     src/threadget.c src/threadhandler.c src/threadinitialize.c \
<font color='#880000'>-    src/threadloadenv.c src/threadready.c src/threadresettimeslice.c \
-    src/threadreset.c src/threadrestart.c src/threadresume.c \
-    src/threadsetpriority.c src/threadsetstate.c src/threadsettransient.c \
</font><font color='#000088'>+    src/threadloadenv.c src/threadready.c src/threadreset.c \
+    src/threadrestart.c src/threadresume.c src/threadsetpriority.c \
+    src/threadsetstate.c src/threadsettransient.c \
</font>     src/threadstackallocate.c src/threadstackfree.c src/threadstart.c \
     src/threadstartmultitasking.c src/threadsuspend.c \
     src/threadtickletimeslice.c src/threadyieldprocessor.c \

<font color='#006600'>diff -u rtems/cpukit/score/include/rtems/score/thread.h:1.93 rtems/cpukit/score/include/rtems/score/thread.h:1.94
--- rtems/cpukit/score/include/rtems/score/thread.h:1.93        Thu Jun 17 23:20:06 2010
+++ rtems/cpukit/score/include/rtems/score/thread.h     Thu Jun 24 16:27:30 2010
</font><font color='#997700'>@@ -672,16 +672,6 @@
</font> );
 
 /**
<font color='#880000'>- *  This routine is invoked upon expiration of the currently
- *  executing thread's timeslice.  If no other thread's are ready
- *  at the priority of the currently executing thread, then the
- *  executing thread's timeslice is reset.  Otherwise, the
- *  currently executing thread is placed at the rear of the
- *  FIFO for this priority and a new heir is selected.
- */
-void _Thread_Reset_timeslice( void );
-
-/**
</font>  *  This routine is invoked as part of processing each clock tick.
  *  It is responsible for determining if the current thread allows
  *  timeslicing and, if so, when its timeslice expires.

<font color='#006600'>diff -u rtems/cpukit/score/src/threadtickletimeslice.c:1.11 rtems/cpukit/score/src/threadtickletimeslice.c:1.12
--- rtems/cpukit/score/src/threadtickletimeslice.c:1.11 Wed Dec  2 12:22:19 2009
+++ rtems/cpukit/score/src/threadtickletimeslice.c      Thu Jun 24 16:27:30 2010
</font><font color='#997700'>@@ -80,7 +80,16 @@
</font>       case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
     #endif
       if ( (int)(--executing->cpu_time_budget) <= 0 ) {
<font color='#880000'>-        _Thread_Reset_timeslice();
</font><font color='#000088'>+
+        /*
+         *  A yield performs the ready chain mechanics needed when
+         *  resetting a timeslice.  If no other thread's are ready
+         *  at the priority of the currently executing thread, then the
+         *  executing thread's timeslice is reset.  Otherwise, the
+         *  currently executing thread is placed at the rear of the
+         *  FIFO for this priority and a new heir is selected.
+         */
+        _Thread_Yield_processor();
</font>         executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
       }
       break;
</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>2010-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com>

        * libfs/src/imfs/imfs_creat.c, libfs/src/imfs/imfs_debug.c,
        libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_eval.c,
        libfs/src/imfs/imfs_fsunmount.c, libfs/src/imfs/imfs_getchild.c,
        libfs/src/imfs/imfs_initsupp.c, libfs/src/imfs/ioman.c,
        libfs/src/imfs/memfile.c: Evaluate all assert calls in IMFS. Either
        made them conditional on RTEMS_DEBUG or eliminated them.
</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.2458&r2=text&tr2=1.2459&diff_format=h">M</a></td><td width='1%'>1.2459</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_creat.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/libfs/src/imfs/imfs_creat.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_debug.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/libfs/src/imfs/imfs_debug.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_directory.c.diff?r1=text&tr1=1.25&r2=text&tr2=1.26&diff_format=h">M</a></td><td width='1%'>1.26</td><td width='100%'>cpukit/libfs/src/imfs/imfs_directory.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_eval.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/libfs/src/imfs/imfs_eval.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_fsunmount.c.diff?r1=text&tr1=1.12&r2=text&tr2=1.13&diff_format=h">M</a></td><td width='1%'>1.13</td><td width='100%'>cpukit/libfs/src/imfs/imfs_fsunmount.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_getchild.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/libfs/src/imfs/imfs_getchild.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_initsupp.c.diff?r1=text&tr1=1.22&r2=text&tr2=1.23&diff_format=h">M</a></td><td width='1%'>1.23</td><td width='100%'>cpukit/libfs/src/imfs/imfs_initsupp.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/ioman.c.diff?r1=text&tr1=1.18&r2=text&tr2=1.19&diff_format=h">M</a></td><td width='1%'>1.19</td><td width='100%'>cpukit/libfs/src/imfs/ioman.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/memfile.c.diff?r1=text&tr1=1.33&r2=text&tr2=1.34&diff_format=h">M</a></td><td width='1%'>1.34</td><td width='100%'>cpukit/libfs/src/imfs/memfile.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2458 rtems/cpukit/ChangeLog:1.2459
--- rtems/cpukit/ChangeLog:1.2458       Thu Jun 24 16:27:29 2010
+++ rtems/cpukit/ChangeLog      Thu Jun 24 16:31:20 2010
</font><font color='#997700'>@@ -1,3 +1,12 @@
</font><font color='#000088'>+2010-06-24    Joel Sherrill <joel.sherrilL@OARcorp.com>
+
+       * libfs/src/imfs/imfs_creat.c, libfs/src/imfs/imfs_debug.c,
+       libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_eval.c,
+       libfs/src/imfs/imfs_fsunmount.c, libfs/src/imfs/imfs_getchild.c,
+       libfs/src/imfs/imfs_initsupp.c, libfs/src/imfs/ioman.c,
+       libfs/src/imfs/memfile.c: Evaluate all assert calls in IMFS. Either
+       made them conditional on RTEMS_DEBUG or eliminated them.
+
</font> 2010-06-24        Gedare Bloom <giddyup44@yahoo.com>
 
        PR 1590/cpukit

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_creat.c:1.15 rtems/cpukit/libfs/src/imfs/imfs_creat.c:1.16
--- rtems/cpukit/libfs/src/imfs/imfs_creat.c:1.15       Tue Jun  8 10:15:31 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_creat.c    Thu Jun 24 16:31:21 2010
</font><font color='#997700'>@@ -17,7 +17,9 @@
</font> #include "config.h"
 #endif
 
<font color='#880000'>-#include <assert.h>
</font><font color='#000088'>+#if defined(RTEMS_DEBUG)
+  #include <assert.h>
+#endif
</font> #include <stdlib.h>
 #include <string.h>
 #include "imfs.h"
<font color='#997700'>@@ -99,8 +101,10 @@
</font>       break;
 
     default:
<font color='#880000'>-      assert(0);
-      break;
</font><font color='#000088'>+      #if defined(RTEMS_DEBUG)
+        assert(0);
+      #endif
+      return;
</font>   }
 
   /*

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_debug.c:1.14 rtems/cpukit/libfs/src/imfs/imfs_debug.c:1.15
--- rtems/cpukit/libfs/src/imfs/imfs_debug.c:1.14       Tue Oct 14 10:06:25 2008
+++ rtems/cpukit/libfs/src/imfs/imfs_debug.c    Thu Jun 24 16:31:21 2010
</font><font color='#997700'>@@ -15,7 +15,9 @@
</font> #include "config.h"
 #endif
 
<font color='#880000'>-#include <assert.h>
</font><font color='#000088'>+#if defined(RTEMS_DEBUG)
+  #include <assert.h>
+#endif
</font> #include <string.h>
 #include <fcntl.h>
 #include <errno.h>
<font color='#997700'>@@ -53,7 +55,9 @@
</font>   IMFS_jnode_t *the_jnode
 )
 {
<font color='#880000'>-  assert( the_jnode );
</font><font color='#000088'>+  #if defined(RTEMS_DEBUG)
+    assert( the_jnode );
+  #endif
</font> 
   fprintf(stdout, "%s", the_jnode->name );
   switch( the_jnode->type ) {
<font color='#997700'>@@ -90,23 +94,19 @@
</font> 
     case IMFS_HARD_LINK:
       fprintf(stdout, " links not printed\n" );
<font color='#880000'>-      assert(0);
-      break;
</font><font color='#000088'>+      return;
</font> 
     case IMFS_SYM_LINK:
       fprintf(stdout, " links not printed\n" );
<font color='#880000'>-      assert(0);
-      break;
</font><font color='#000088'>+      return;
</font> 
     case IMFS_FIFO:
       fprintf(stdout, " FIFO not printed\n" );
<font color='#880000'>-      assert(0);
-      break;
</font><font color='#000088'>+      return;
</font> 
     default:
       fprintf(stdout, " bad type %d\n", the_jnode->type );
<font color='#880000'>-      assert(0);
-      break;
</font><font color='#000088'>+      return;
</font>   }
   puts("");
 }
<font color='#997700'>@@ -129,11 +129,11 @@
</font>   IMFS_jnode_t         *the_jnode;
   int                   i;
 
<font color='#880000'>-  assert( the_directory );
-
-  assert( level >= 0 );
-
-  assert( the_directory->type == IMFS_DIRECTORY );
</font><font color='#000088'>+  #if defined(RTEMS_DEBUG)
+    assert( the_directory );
+    assert( level >= 0 );
+    assert( the_directory->type == IMFS_DIRECTORY );
+  #endif
</font> 
   the_chain = &the_directory->info.directory.Entries;
 

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_directory.c:1.25 rtems/cpukit/libfs/src/imfs/imfs_directory.c:1.26
--- rtems/cpukit/libfs/src/imfs/imfs_directory.c:1.25   Tue Jun  8 03:50:56 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_directory.c        Thu Jun 24 16:31:21 2010
</font><font color='#997700'>@@ -23,7 +23,6 @@
</font> #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
<font color='#880000'>-#include <assert.h>
</font> #include <dirent.h>
 
 #include "imfs.h"
<font color='#997700'>@@ -179,7 +178,7 @@
</font>  *                directory
  *     SEEK_CUR - offset is used as the relative byte offset from the current
  *                directory position index held in the iop structure
<font color='#880000'>- *     SEEK_END - N/A --> This will cause an assert.
</font><font color='#000088'>+ *     SEEK_END - N/A --> This will cause an EINVAL to be returned.
</font>  */
 
 rtems_off64_t imfs_dir_lseek(

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.27 rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.28
--- rtems/cpukit/libfs/src/imfs/imfs_eval.c:1.27        Tue Jun  8 05:25:44 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_eval.c     Thu Jun 24 16:31:22 2010
</font><font color='#997700'>@@ -21,7 +21,6 @@
</font> #include <unistd.h>
 #include <errno.h>
 #include <stdlib.h>
<font color='#880000'>-#include <assert.h>
</font> 
 #include "imfs.h"
 #include <rtems/libio_.h>
<font color='#997700'>@@ -83,7 +82,6 @@
</font>   int           flags_to_test;
 
   if ( !rtems_libio_is_valid_perms( flags ) ) {
<font color='#880000'>-    assert( 0 );
</font>     rtems_set_errno_and_return_minus_one( EIO );
   }
 
<font color='#997700'>@@ -501,7 +499,6 @@
</font>   int                                 result;
 
   if ( !rtems_libio_is_valid_perms( flags ) ) {
<font color='#880000'>-    assert( 0 );
</font>     rtems_set_errno_and_return_minus_one( EIO );
   }
 

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_fsunmount.c:1.12 rtems/cpukit/libfs/src/imfs/imfs_fsunmount.c:1.13
--- rtems/cpukit/libfs/src/imfs/imfs_fsunmount.c:1.12   Thu Jun 11 20:53:33 2009
+++ rtems/cpukit/libfs/src/imfs/imfs_fsunmount.c        Thu Jun 24 16:31:22 2010
</font><font color='#997700'>@@ -20,8 +20,6 @@
</font> #include <unistd.h>
 #include <stdlib.h>
 
<font color='#880000'>-#include <assert.h>
-
</font> #include "imfs.h"
 #include <rtems/libio_.h>
 

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_getchild.c:1.10 rtems/cpukit/libfs/src/imfs/imfs_getchild.c:1.11
--- rtems/cpukit/libfs/src/imfs/imfs_getchild.c:1.10    Wed Jul  2 20:37:38 2008
+++ rtems/cpukit/libfs/src/imfs/imfs_getchild.c Thu Jun 24 16:31:22 2010
</font><font color='#997700'>@@ -17,8 +17,10 @@
</font> #include "config.h"
 #endif
 
<font color='#000088'>+#if defined(RTEMS_DEBUG)
+  #include <assert.h>
+#endif
</font> #include <errno.h>
<font color='#880000'>-#include <assert.h>
</font> #include <string.h>
 #include "imfs.h"
 
<font color='#997700'>@@ -39,11 +41,13 @@
</font>    *  the IMFS code.
    */
 
<font color='#880000'>-  assert( directory );
</font><font color='#000088'>+  #if defined(RTEMS_DEBUG)
+    assert( directory );
+    assert( name );
+  #endif
</font>   if ( !name )
     return 0;
 
<font color='#880000'>-  assert( name );
</font>   if ( !directory )
     return 0;
 

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_initsupp.c:1.22 rtems/cpukit/libfs/src/imfs/imfs_initsupp.c:1.23
--- rtems/cpukit/libfs/src/imfs/imfs_initsupp.c:1.22    Tue Jun  8 05:25:45 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_initsupp.c Thu Jun 24 16:31:22 2010
</font><font color='#997700'>@@ -20,8 +20,6 @@
</font> #include <unistd.h>
 #include <stdlib.h>
 
<font color='#880000'>-#include <assert.h>
-
</font> #include "imfs.h"
 #include <rtems/libio_.h>
 #include <rtems/seterr.h>

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/ioman.c:1.18 rtems/cpukit/libfs/src/imfs/ioman.c:1.19
--- rtems/cpukit/libfs/src/imfs/ioman.c:1.18    Wed Oct 14 11:09:11 2009
+++ rtems/cpukit/libfs/src/imfs/ioman.c Thu Jun 24 16:31:22 2010
</font><font color='#997700'>@@ -22,8 +22,6 @@
</font> #include <unistd.h>
 #include <string.h>
 
<font color='#880000'>-#include <assert.h>
-
</font> #include <rtems.h>
 #include <rtems/libio_.h>
 #include <rtems/seterr.h>

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/memfile.c:1.33 rtems/cpukit/libfs/src/imfs/memfile.c:1.34
--- rtems/cpukit/libfs/src/imfs/memfile.c:1.33  Tue Jun  8 03:50:56 2010
+++ rtems/cpukit/libfs/src/imfs/memfile.c       Thu Jun 24 16:31:22 2010
</font><font color='#997700'>@@ -23,7 +23,6 @@
</font> 
 #include <stdlib.h>
 #include <string.h>
<font color='#880000'>-#include <assert.h>
</font> #include <errno.h>
 
 #include <rtems.h>
<font color='#997700'>@@ -301,11 +300,13 @@
</font>    *  Perform internal consistency checks
    */
 
<font color='#880000'>-  assert( the_jnode );
</font><font color='#000088'>+  #if defined(RTEMS_DEBUG)
+    assert( the_jnode );
+    assert( the_jnode->type == IMFS_MEMORY_FILE );
+  #endif
</font>   if ( !the_jnode )
     rtems_set_errno_and_return_minus_one( EIO );
 
<font color='#880000'>-  assert( the_jnode->type == IMFS_MEMORY_FILE );
</font>   if ( the_jnode->type != IMFS_MEMORY_FILE )
     rtems_set_errno_and_return_minus_one( EIO );
 
<font color='#997700'>@@ -357,11 +358,13 @@
</font>   block_p  memory;
   block_p *block_entry_ptr;
 
<font color='#880000'>-  assert( the_jnode );
</font><font color='#000088'>+  #if defined(RTEMS_DEBUG)
+    assert( the_jnode );
+    assert( the_jnode->type == IMFS_MEMORY_FILE );
+  #endif
</font>   if ( !the_jnode )
     rtems_set_errno_and_return_minus_one( EIO );
 
<font color='#880000'>-  assert( the_jnode->type == IMFS_MEMORY_FILE );
</font>   if ( the_jnode->type != IMFS_MEMORY_FILE )
     rtems_set_errno_and_return_minus_one( EIO );
 
<font color='#997700'>@@ -402,7 +405,9 @@
</font>   block_p  ptr;
 
   block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
<font color='#880000'>-  assert( block_ptr );
</font><font color='#000088'>+  #if defined(RTEMS_DEBUG)
+    assert( block_ptr );
+  #endif
</font>   if ( block_ptr ) {
     ptr = *block_ptr;
     *block_ptr = 0;
<font color='#997700'>@@ -431,7 +436,9 @@
</font>    *  Perform internal consistency checks
    */
 
<font color='#880000'>-  assert( block_table );
</font><font color='#000088'>+  #if defined(RTEMS_DEBUG)
+    assert( block_table );
+  #endif
</font>   if ( !block_table )
     return;
 
<font color='#997700'>@@ -490,11 +497,13 @@
</font>    *  Perform internal consistency checks
    */
 
<font color='#880000'>-  assert( the_jnode );
</font><font color='#000088'>+  #if defined(RTEMS_DEBUG)
+    assert( the_jnode );
+    assert( the_jnode->type == IMFS_MEMORY_FILE );
+  #endif
</font>   if ( !the_jnode )
     rtems_set_errno_and_return_minus_one( EIO );
 
<font color='#880000'>-  assert( the_jnode->type == IMFS_MEMORY_FILE );
</font>   if ( the_jnode->type != IMFS_MEMORY_FILE )
     rtems_set_errno_and_return_minus_one( EIO );
 
<font color='#997700'>@@ -584,12 +593,14 @@
</font>    *  Perform internal consistency checks
    */
 
<font color='#880000'>-  assert( the_jnode );
</font><font color='#000088'>+  #if defined(RTEMS_DEBUG)
+    assert( the_jnode );
+    assert( the_jnode->type == IMFS_MEMORY_FILE ||
+    assert( dest );
+  #endif
</font>   if ( !the_jnode )
     rtems_set_errno_and_return_minus_one( EIO );
 
<font color='#880000'>-  assert( the_jnode->type == IMFS_MEMORY_FILE ||
-          the_jnode->type == IMFS_LINEAR_FILE );
</font>   if ( the_jnode->type != IMFS_MEMORY_FILE &&
        the_jnode->type != IMFS_LINEAR_FILE )
     rtems_set_errno_and_return_minus_one( EIO );
<font color='#997700'>@@ -598,7 +609,6 @@
</font>    *  Error checks on arguments
    */
 
<font color='#880000'>-  assert( dest );
</font>   if ( !dest )
     rtems_set_errno_and_return_minus_one( EINVAL );
 
<font color='#997700'>@@ -658,7 +668,6 @@
</font>     if ( to_copy > my_length )
       to_copy = my_length;
     block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
<font color='#880000'>-    assert( block_ptr );
</font>     if ( !block_ptr )
       return copied;
     memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
<font color='#997700'>@@ -675,7 +684,6 @@
</font>   to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
   while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
     block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
<font color='#880000'>-    assert( block_ptr );
</font>     if ( !block_ptr )
       return copied;
     memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
<font color='#997700'>@@ -689,11 +697,12 @@
</font>    *  Phase 3: possibly the first part of one block
    */
 
<font color='#880000'>-  assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
</font><font color='#000088'>+  #if defined(RTEMS_DEBUG)
+    assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
+  #endif
</font> 
   if ( my_length ) {
     block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
<font color='#880000'>-    assert( block_ptr );
</font>     if ( !block_ptr )
       return copied;
     memcpy( dest, &(*block_ptr)[ 0 ], my_length );
<font color='#997700'>@@ -735,11 +744,14 @@
</font>    *  Perform internal consistency checks
    */
 
<font color='#880000'>-  assert( the_jnode );
</font><font color='#000088'>+  #if defined(RTEMS_DEBUG)
+    assert( source );
+    assert( the_jnode );
+    assert( the_jnode->type == IMFS_MEMORY_FILE );
+  #endif
</font>   if ( !the_jnode )
     rtems_set_errno_and_return_minus_one( EIO );
 
<font color='#880000'>-  assert( the_jnode->type == IMFS_MEMORY_FILE );
</font>   if ( the_jnode->type != IMFS_MEMORY_FILE )
     rtems_set_errno_and_return_minus_one( EIO );
 
<font color='#997700'>@@ -747,7 +759,6 @@
</font>    *  Error check arguments
    */
 
<font color='#880000'>-  assert( source );
</font>   if ( !source )
     rtems_set_errno_and_return_minus_one( EINVAL );
 
<font color='#997700'>@@ -792,12 +803,19 @@
</font>     if ( to_copy > my_length )
       to_copy = my_length;
     block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
<font color='#880000'>-    assert( block_ptr );
</font>     if ( !block_ptr )
       return copied;
<font color='#880000'>-#if 0
-fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
-#endif
</font><font color='#000088'>+    #if 0
+      fprintf(
+        stderr,
+        "write %d at %d in %d: %*s\n",
+        to_copy,
+        start_offset,
+        block,
+        to_copy,
+        src
+      );
+    #endif
</font>     memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
     src += to_copy;
     block++;
<font color='#997700'>@@ -812,12 +830,11 @@
</font>   to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
   while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
     block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
<font color='#880000'>-    assert( block_ptr );
</font>     if ( !block_ptr )
       return copied;
<font color='#880000'>-#if 0
-fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
-#endif
</font><font color='#000088'>+    #if 0
+      fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
+    #endif
</font>     memcpy( &(*block_ptr)[ 0 ], src, to_copy );
     src += to_copy;
     block++;
<font color='#997700'>@@ -829,17 +846,18 @@
</font>    *  Phase 3: possibly the first part of one block
    */
 
<font color='#880000'>-  assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
</font><font color='#000088'>+  #if defined(RTEMS_DEBUG)
+    assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
+  #endif
</font> 
   to_copy = my_length;
   if ( my_length ) {
     block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
<font color='#880000'>-    assert( block_ptr );
</font>     if ( !block_ptr )
       return copied;
<font color='#880000'>-#if 0
-fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
-#endif
</font><font color='#000088'>+    #if 0
+    fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
+    #endif
</font>     memcpy( &(*block_ptr)[ 0 ], src, my_length );
     my_length = 0;
     copied += to_copy;
<font color='#997700'>@@ -900,11 +918,13 @@
</font>    *  Perform internal consistency checks
    */
 
<font color='#880000'>-  assert( the_jnode );
</font><font color='#000088'>+  #if defined(RTEMS_DEBUG)
+    assert( the_jnode );
+    assert( the_jnode->type == IMFS_MEMORY_FILE );
+  #endif
</font>   if ( !the_jnode )
     return NULL;
 
<font color='#880000'>-  assert( the_jnode->type == IMFS_MEMORY_FILE );
</font>   if ( the_jnode->type != IMFS_MEMORY_FILE )
     return NULL;
 
<font color='#997700'>@@ -917,10 +937,6 @@
</font>    */
 
   if ( my_block <= LAST_INDIRECT ) {
<font color='#880000'>-#if 0
-fprintf(stdout, "(s %d) ", block );
-fflush(stdout);
-#endif
</font>     p = info->indirect;
 
     if ( malloc_it ) {
</pre>
<p> </p>
<a name='cs3'></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-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com>

        * libfs/src/imfs/imfs_creat.c: Fix warning.
</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.2459&r2=text&tr2=1.2460&diff_format=h">M</a></td><td width='1%'>1.2460</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/imfs_creat.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/libfs/src/imfs/imfs_creat.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2459 rtems/cpukit/ChangeLog:1.2460
--- rtems/cpukit/ChangeLog:1.2459       Thu Jun 24 16:31:20 2010
+++ rtems/cpukit/ChangeLog      Thu Jun 24 16:37:08 2010
</font><font color='#997700'>@@ -1,5 +1,9 @@
</font> 2010-06-24        Joel Sherrill <joel.sherrilL@OARcorp.com>
 
<font color='#000088'>+   * libfs/src/imfs/imfs_creat.c: Fix warning.
+
+2010-06-24     Joel Sherrill <joel.sherrilL@OARcorp.com>
+
</font>   * libfs/src/imfs/imfs_creat.c, libfs/src/imfs/imfs_debug.c,
        libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_eval.c,
        libfs/src/imfs/imfs_fsunmount.c, libfs/src/imfs/imfs_getchild.c,

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/imfs_creat.c:1.16 rtems/cpukit/libfs/src/imfs/imfs_creat.c:1.17
--- rtems/cpukit/libfs/src/imfs/imfs_creat.c:1.16       Thu Jun 24 16:31:21 2010
+++ rtems/cpukit/libfs/src/imfs/imfs_creat.c    Thu Jun 24 16:37:08 2010
</font><font color='#997700'>@@ -104,7 +104,7 @@
</font>       #if defined(RTEMS_DEBUG)
         assert(0);
       #endif
<font color='#880000'>-      return;
</font><font color='#000088'>+      break;
</font>   }
 
   /*
</pre>
<p> </p>
<a name='cs4'></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-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com>

        * libcsupport/src/read.c, libcsupport/src/write.c: read(2) and write(2)
        should return 0 when passed a count of 0 after verifying other
        possible errors.
</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.2460&r2=text&tr2=1.2461&diff_format=h">M</a></td><td width='1%'>1.2461</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/read.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/libcsupport/src/read.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libcsupport/src/write.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/libcsupport/src/write.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2460 rtems/cpukit/ChangeLog:1.2461
--- rtems/cpukit/ChangeLog:1.2460       Thu Jun 24 16:37:08 2010
+++ rtems/cpukit/ChangeLog      Thu Jun 24 16:48:52 2010
</font><font color='#997700'>@@ -1,5 +1,11 @@
</font> 2010-06-24        Joel Sherrill <joel.sherrilL@OARcorp.com>
 
<font color='#000088'>+   * libcsupport/src/read.c, libcsupport/src/write.c: read(2) and write(2)
+       should return 0 when passed a count of 0 after verifying other
+       possible errors.
+
+2010-06-24     Joel Sherrill <joel.sherrilL@OARcorp.com>
+
</font>   * libfs/src/imfs/imfs_creat.c: Fix warning.
 
 2010-06-24     Joel Sherrill <joel.sherrilL@OARcorp.com>

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/read.c:1.15 rtems/cpukit/libcsupport/src/read.c:1.16
--- rtems/cpukit/libcsupport/src/read.c:1.15    Wed Sep 30 03:20:31 2009
+++ rtems/cpukit/libcsupport/src/read.c Thu Jun 24 16:48:52 2010
</font><font color='#997700'>@@ -34,10 +34,12 @@
</font>   rtems_libio_check_count( count );
   rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
 
<font color='#000088'>+  if ( count == 0 )
+    return 0;
+
</font>   /*
    *  Now process the read().
    */
<font color='#880000'>-
</font>   if ( !iop->handlers->read_h )
     rtems_set_errno_and_return_minus_one( ENOTSUP );
 

<font color='#006600'>diff -u rtems/cpukit/libcsupport/src/write.c:1.16 rtems/cpukit/libcsupport/src/write.c:1.17
--- rtems/cpukit/libcsupport/src/write.c:1.16   Thu Sep 20 17:25:14 2007
+++ rtems/cpukit/libcsupport/src/write.c        Thu Jun 24 16:48:52 2010
</font><font color='#997700'>@@ -41,10 +41,12 @@
</font>   rtems_libio_check_count( count );
   rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
 
<font color='#000088'>+  if ( count == 0 )
+    return 0;
+
</font>   /*
    *  Now process the write() request.
    */
<font color='#880000'>-
</font>   if ( !iop->handlers->write_h )
     rtems_set_errno_and_return_minus_one( ENOTSUP );
 
</pre>
<p> </p>
<a name='cs5'></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-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com>

        * libfs/src/imfs/memfile.c: Fix assert.
</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.2461&r2=text&tr2=1.2462&diff_format=h">M</a></td><td width='1%'>1.2462</td><td width='100%'>cpukit/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/cpukit/libfs/src/imfs/memfile.c.diff?r1=text&tr1=1.34&r2=text&tr2=1.35&diff_format=h">M</a></td><td width='1%'>1.35</td><td width='100%'>cpukit/libfs/src/imfs/memfile.c</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/cpukit/ChangeLog:1.2461 rtems/cpukit/ChangeLog:1.2462
--- rtems/cpukit/ChangeLog:1.2461       Thu Jun 24 16:48:52 2010
+++ rtems/cpukit/ChangeLog      Thu Jun 24 17:01:49 2010
</font><font color='#997700'>@@ -1,5 +1,9 @@
</font> 2010-06-24        Joel Sherrill <joel.sherrilL@OARcorp.com>
 
<font color='#000088'>+   * libfs/src/imfs/memfile.c: Fix assert.
+
+2010-06-24     Joel Sherrill <joel.sherrilL@OARcorp.com>
+
</font>   * libcsupport/src/read.c, libcsupport/src/write.c: read(2) and write(2)
        should return 0 when passed a count of 0 after verifying other
        possible errors.

<font color='#006600'>diff -u rtems/cpukit/libfs/src/imfs/memfile.c:1.34 rtems/cpukit/libfs/src/imfs/memfile.c:1.35
--- rtems/cpukit/libfs/src/imfs/memfile.c:1.34  Thu Jun 24 16:31:22 2010
+++ rtems/cpukit/libfs/src/imfs/memfile.c       Thu Jun 24 17:01:49 2010
</font><font color='#997700'>@@ -596,6 +596,7 @@
</font>   #if defined(RTEMS_DEBUG)
     assert( the_jnode );
     assert( the_jnode->type == IMFS_MEMORY_FILE ||
<font color='#000088'>+       the_jnode->type != IMFS_LINEAR_FILE );
</font>     assert( dest );
   #endif
   if ( !the_jnode )
</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>