OSDN Git Service

2009-01-12 Jeff Johnston <jjohnstn@redhat.com>
authorjjohnstn <jjohnstn>
Mon, 12 Jan 2009 22:19:11 +0000 (22:19 +0000)
committerjjohnstn <jjohnstn>
Mon, 12 Jan 2009 22:19:11 +0000 (22:19 +0000)
        * libc/stdio/fwalk.c (__fwalk, __fwalk_reent): Remove locking of
        each fp.  Let the function being called lock the fp, if necessary.

newlib/ChangeLog
newlib/libc/stdio/fwalk.c

index fa3167a..317df80 100644 (file)
@@ -1,3 +1,8 @@
+2009-01-12  Jeff Johnston  <jjohnstn@redhat.com>
+
+       * libc/stdio/fwalk.c (__fwalk, __fwalk_reent): Remove locking of
+       each fp.  Let the function being called lock the fp, if necessary.
+
 2009-01-07  Kazu Hirata  <kazu@codesourcery.com>
 
        * libc/include/sys/stdio.h (_flockfile, _funlockfile): Fix typos.
index 376959d..24cbe9a 100644 (file)
@@ -40,10 +40,8 @@ _DEFUN(__fwalk, (ptr, function),
     for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++)
       if (fp->_flags != 0)
         {
-          _flockfile (fp);
           if (fp->_flags != 0 && fp->_file != -1)
             ret |= (*function) (fp);
-          _funlockfile (fp);
         }
 
   return ret;
@@ -64,10 +62,8 @@ _DEFUN(__fwalk_reent, (ptr, reent_function),
     for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++)
       if (fp->_flags != 0)
         {
-          _flockfile (fp);
           if (fp->_flags != 0 && fp->_file != -1)
             ret |= (*reent_function) (ptr, fp);
-          _funlockfile (fp);
         }
 
   return ret;