From: jjohnstn Date: Mon, 12 Jan 2009 22:19:11 +0000 (+0000) Subject: 2009-01-12 Jeff Johnston X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3a469bbaee940c3454bd76cfc363810043d62498;p=pf3gnuchains%2Fpf3gnuchains3x.git 2009-01-12 Jeff Johnston * libc/stdio/fwalk.c (__fwalk, __fwalk_reent): Remove locking of each fp. Let the function being called lock the fp, if necessary. --- diff --git a/newlib/ChangeLog b/newlib/ChangeLog index fa3167a1ed..317df8060a 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2009-01-12 Jeff Johnston + + * 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 * libc/include/sys/stdio.h (_flockfile, _funlockfile): Fix typos. diff --git a/newlib/libc/stdio/fwalk.c b/newlib/libc/stdio/fwalk.c index 376959dcdf..24cbe9ac48 100644 --- a/newlib/libc/stdio/fwalk.c +++ b/newlib/libc/stdio/fwalk.c @@ -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;