aboutsummaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2009-01-12 22:19:11 +0000
committerJeff Johnston <jjohnstn@redhat.com>2009-01-12 22:19:11 +0000
commitceedb0dcb899ade1e3e4ecf417accd938a71b7c9 (patch)
treeefa49c2b8cef01cf300c8a5464ea304b60193a2c /newlib
parent8a0f3bbf2ddf19cb94c83adea8059c9969692be6 (diff)
downloadnewlib-ceedb0dcb899ade1e3e4ecf417accd938a71b7c9.zip
newlib-ceedb0dcb899ade1e3e4ecf417accd938a71b7c9.tar.gz
newlib-ceedb0dcb899ade1e3e4ecf417accd938a71b7c9.tar.bz2
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.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/stdio/fwalk.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index fa3167a..317df80 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -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.
diff --git a/newlib/libc/stdio/fwalk.c b/newlib/libc/stdio/fwalk.c
index 376959d..24cbe9a 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;