From 7a0f696676736d2d8b1d214f9f0cfa5ce8ce76c1 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 16 Sep 2004 21:26:51 +0000 Subject: 2004-09-16 Antony King * 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. --- newlib/libc/stdio/fwalk.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'newlib/libc/stdio/fwalk.c') diff --git a/newlib/libc/stdio/fwalk.c b/newlib/libc/stdio/fwalk.c index bb43cf2f3..376959dcd 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 (); -- cgit v1.2.3