diff options
author | Matt Joyce <matthew.joyce@embedded-brains.de> | 2022-02-22 13:18:38 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2022-02-22 14:38:46 +0300 |
commit | 44b60f0c4ba597c55dcac4f2d3119a3055c80ba1 (patch) | |
tree | e5286802e8b24fcbb7437f00163daaab0f439f2c /newlib/libc/machine | |
parent | 054b00d96a81ca1169a1dd2d63d79b7ac03919ac (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.h | 2 | ||||
-rw-r--r-- | newlib/libc/machine/spu/stdio.c | 1 |
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; |