diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2004-09-16 21:26:51 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2004-09-16 21:26:51 +0000 |
commit | 7a0f696676736d2d8b1d214f9f0cfa5ce8ce76c1 (patch) | |
tree | ad51763ff7cdbd9ef9f237c3b55e24d8e82603eb /newlib | |
parent | c77672c0fd86170f7128b19bb4030710c41ab794 (diff) | |
download | newlib-7a0f696676736d2d8b1d214f9f0cfa5ce8ce76c1.zip newlib-7a0f696676736d2d8b1d214f9f0cfa5ce8ce76c1.tar.gz newlib-7a0f696676736d2d8b1d214f9f0cfa5ce8ce76c1.tar.bz2 |
2004-09-16 Antony King <antony.king@st.com>
* libc/stdio/fwalk.c (_fwalk): Remove check for _GLOBAL_REENT
and only walk the reentrancy parameter.
(_fwalk_reent): Ditto.
* libc/stdlib/exit.c: Remove out of date _REENT_ONLY check.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 7 | ||||
-rw-r--r-- | newlib/libc/stdio/fwalk.c | 18 | ||||
-rw-r--r-- | newlib/libc/stdlib/exit.c | 4 |
3 files changed, 13 insertions, 16 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 2dfa2d0..9c4b35f 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,5 +1,12 @@ 2004-09-16 Antony King <antony.king@st.com> + * libc/stdio/fwalk.c (_fwalk): Remove check for _GLOBAL_REENT + and only walk the reentrancy parameter. + (_fwalk_reent): Ditto. + * libc/stdlib/exit.c: Remove out of date _REENT_ONLY check. + +2004-09-16 Antony King <antony.king@st.com> + * libc/stdio64/freopen64.c: Remove casting of fp lock to _LOCK_RECURSIVE_T. diff --git a/newlib/libc/stdio/fwalk.c b/newlib/libc/stdio/fwalk.c index bb43cf2..376959d 100644 --- a/newlib/libc/stdio/fwalk.c +++ b/newlib/libc/stdio/fwalk.c @@ -82,12 +82,9 @@ _DEFUN(_fwalk, (ptr, function), __sfp_lock_acquire (); - /* Must traverse given list for std streams. */ - if (ptr != _GLOBAL_REENT) - ret |= __fwalk (ptr, function); - - /* Must traverse global list for all other streams. */ - ret |= __fwalk (_GLOBAL_REENT, function); + /* Must traverse given list for streams. Note that _GLOBAL_REENT + only walked once in exit(). */ + ret |= __fwalk (ptr, function); __sfp_lock_release (); @@ -105,12 +102,9 @@ _DEFUN(_fwalk_reent, (ptr, reent_function), __sfp_lock_acquire (); - /* Must traverse given list for std streams. */ - if (ptr != _GLOBAL_REENT) - ret |= __fwalk_reent (ptr, reent_function); - - /* Must traverse global list for all other streams. */ - ret |= __fwalk_reent (_GLOBAL_REENT, reent_function); + /* Must traverse given list for streams. Note that _GLOBAL_REENT + only walked once in exit(). */ + ret |= __fwalk_reent (ptr, reent_function); __sfp_lock_release (); diff --git a/newlib/libc/stdlib/exit.c b/newlib/libc/stdlib/exit.c index b5ef05f..195b724 100644 --- a/newlib/libc/stdlib/exit.c +++ b/newlib/libc/stdlib/exit.c @@ -50,8 +50,6 @@ Supporting OS subroutines required: <<_exit>>. #include <reent.h> #include "atexit.h" -#ifndef _REENT_ONLY - /* * Exit, flushing stdio buffers if necessary. */ @@ -66,5 +64,3 @@ _DEFUN (exit, (code), (*_GLOBAL_REENT->__cleanup) (_GLOBAL_REENT); _exit (code); } - -#endif |