Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/findfp.c')
-rw-r--r--newlib/libc/stdio/findfp.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c
index 0beb1e5b0..d81241434 100644
--- a/newlib/libc/stdio/findfp.c
+++ b/newlib/libc/stdio/findfp.c
@@ -108,7 +108,7 @@ _DEFUN(__sfp, (d),
int n;
struct _glue *g;
- _newlib_sfp_lock_start ();
+ __sfp_lock_acquire ();
if (!_GLOBAL_REENT->__sdidinit)
__sinit (_GLOBAL_REENT);
@@ -121,7 +121,7 @@ _DEFUN(__sfp, (d),
(g->_next = __sfmoreglue (d, NDYNAMIC)) == NULL)
break;
}
- _newlib_sfp_lock_exit ();
+ __sfp_lock_release ();
d->_errno = ENOMEM;
return NULL;
@@ -132,7 +132,7 @@ found:
#ifndef __SINGLE_THREAD__
__lock_init_recursive (fp->_lock);
#endif
- _newlib_sfp_lock_end ();
+ __sfp_lock_release ();
fp->_p = NULL; /* no current pointer */
fp->_w = 0; /* nothing to read or write */
@@ -200,11 +200,6 @@ _DEFUN(__sinit, (s),
#else
s->__sglue._niobs = 0;
s->__sglue._iobs = NULL;
- /* Avoid infinite recursion when calling __sfp for _GLOBAL_REENT. The
- problem is that __sfp checks for _GLOBAL_REENT->__sdidinit and calls
- __sinit if it's 0. */
- if (s == _GLOBAL_REENT)
- s->__sdidinit = 1;
s->_stdin = __sfp(s);
s->_stdout = __sfp(s);
s->_stderr = __sfp(s);