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.
This commit is contained in:
parent
8a0f3bbf2d
commit
ceedb0dcb8
|
@ -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>
|
2009-01-07 Kazu Hirata <kazu@codesourcery.com>
|
||||||
|
|
||||||
* libc/include/sys/stdio.h (_flockfile, _funlockfile): Fix typos.
|
* libc/include/sys/stdio.h (_flockfile, _funlockfile): Fix typos.
|
||||||
|
|
|
@ -40,10 +40,8 @@ _DEFUN(__fwalk, (ptr, function),
|
||||||
for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++)
|
for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++)
|
||||||
if (fp->_flags != 0)
|
if (fp->_flags != 0)
|
||||||
{
|
{
|
||||||
_flockfile (fp);
|
|
||||||
if (fp->_flags != 0 && fp->_file != -1)
|
if (fp->_flags != 0 && fp->_file != -1)
|
||||||
ret |= (*function) (fp);
|
ret |= (*function) (fp);
|
||||||
_funlockfile (fp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -64,10 +62,8 @@ _DEFUN(__fwalk_reent, (ptr, reent_function),
|
||||||
for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++)
|
for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++)
|
||||||
if (fp->_flags != 0)
|
if (fp->_flags != 0)
|
||||||
{
|
{
|
||||||
_flockfile (fp);
|
|
||||||
if (fp->_flags != 0 && fp->_file != -1)
|
if (fp->_flags != 0 && fp->_file != -1)
|
||||||
ret |= (*reent_function) (ptr, fp);
|
ret |= (*reent_function) (ptr, fp);
|
||||||
_funlockfile (fp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue