aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc/stdio/fwalk.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2022-03-30 11:15:07 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-03-31 07:54:04 +0200
commit7a5903078db9e7e0680956f3e0b36d6b96cd5b80 (patch)
tree6fccc0402b5ccd3586af1919d68cd14023d205fb /newlib/libc/stdio/fwalk.c
parent0239bc706a32364edc95ea06f667f4b233f74b77 (diff)
downloadnewlib-7a5903078db9e7e0680956f3e0b36d6b96cd5b80.zip
newlib-7a5903078db9e7e0680956f3e0b36d6b96cd5b80.tar.gz
newlib-7a5903078db9e7e0680956f3e0b36d6b96cd5b80.tar.bz2
Replace _fwalk() calls with _fwalk_reent()
Remove the _fwalk() implementation to avoid duplicated code with _fwalk_reent().
Diffstat (limited to 'newlib/libc/stdio/fwalk.c')
-rw-r--r--newlib/libc/stdio/fwalk.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/newlib/libc/stdio/fwalk.c b/newlib/libc/stdio/fwalk.c
index 8040d57..2cefcc4 100644
--- a/newlib/libc/stdio/fwalk.c
+++ b/newlib/libc/stdio/fwalk.c
@@ -28,32 +28,6 @@ static char sccsid[] = "%W% (Berkeley) %G%";
#include "local.h"
int
-_fwalk (struct _reent *ptr,
- register int (*function) (FILE *))
-{
- register FILE *fp;
- register int n, ret = 0;
- register struct _glue *g;
-
- /*
- * It should be safe to walk the list without locking it;
- * new nodes are only added to the end and none are ever
- * removed.
- *
- * Avoid locking this list while walking it or else you will
- * introduce a potential deadlock in [at least] refill.c.
- */
- for (g = &ptr->__sglue; g != NULL; g = g->_next)
- for (fp = g->_iobs, n = g->_niobs; --n >= 0; fp++)
- if (fp->_flags != 0 && fp->_flags != 1 && fp->_file != -1)
- ret |= (*function) (fp);
-
- return ret;
-}
-
-/* Special version of __fwalk where the function pointer is a reentrant
- I/O function (e.g. _fclose_r). */
-int
_fwalk_reent (struct _reent *ptr,
register int (*reent_function) (struct _reent *, FILE *))
{