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:
authorMatt Joyce <matthew.joyce@embedded-brains.de>2022-02-22 13:18:38 +0300
committerCorinna Vinschen <corinna@vinschen.de>2022-02-22 14:38:46 +0300
commit44b60f0c4ba597c55dcac4f2d3119a3055c80ba1 (patch)
treee5286802e8b24fcbb7437f00163daaab0f439f2c /newlib/libc/machine
parent054b00d96a81ca1169a1dd2d63d79b7ac03919ac (diff)
Make __sdidinit unused
Remove dependency on __sdidinit member of struct _reent to check object initialization. Like __sdidinit, the __cleanup member of struct _reent is initialized in the __sinit() function. Checking initialization against __cleanup serves the same purpose and will reduce overhead in the __sfp() function in a follow up patch.
Diffstat (limited to 'newlib/libc/machine')
-rw-r--r--newlib/libc/machine/spu/c99ppe.h2
-rw-r--r--newlib/libc/machine/spu/stdio.c1
2 files changed, 1 insertions, 2 deletions
diff --git a/newlib/libc/machine/spu/c99ppe.h b/newlib/libc/machine/spu/c99ppe.h
index ccd2d257c..12a2cb3fb 100644
--- a/newlib/libc/machine/spu/c99ppe.h
+++ b/newlib/libc/machine/spu/c99ppe.h
@@ -104,7 +104,7 @@ FILE *__sfp (struct _reent *);
#define __sfp_free(fp) ( (fp)->_fp = 0 )
#define CHECK_INIT(ptr) \
- do { if ((ptr) && !(ptr)->__sdidinit) __sinit (ptr); } while (0)
+ do { if ((ptr) && !(ptr)->__cleanup) __sinit (ptr); } while (0)
#define CHECK_STD_INIT(ptr) /* currently, do nothing */
#define CHECK_STR_INIT(ptr) /* currently, do nothing */
#endif /* __ASSEMBLER__ */
diff --git a/newlib/libc/machine/spu/stdio.c b/newlib/libc/machine/spu/stdio.c
index 2a308b8aa..87e4c406d 100644
--- a/newlib/libc/machine/spu/stdio.c
+++ b/newlib/libc/machine/spu/stdio.c
@@ -66,7 +66,6 @@ void
__sinit (struct _reent *s)
{
s->__cleanup = __cleanup;
- s->__sdidinit = 1;
s->_stdin = &s->__sf[0];
s->_stdin->_fp = SPE_STDIN;