From: Corinna Vinschen <vinschen@redhat.com>
To: newlib@sourceware.org
Subject: Re: [PATCH] Fix __sFILE::_lock initialization
Date: Thu, 19 May 2022 14:04:53 +0200 [thread overview]
Message-ID: <YoYyZQsSiOtsftir@calimero.vinschen.de> (raw)
In-Reply-To: <20220518171307.53663-2-sebastian.huber@embedded-brains.de>
On May 18 19:13, Sebastian Huber wrote:
> The __sFILE::_lock member is present if __SINGLE_THREAD__ is not defined. In
> this case, it is initialized in __sfp(). It is a bug to do it sometimes also
> in std().
> ---
> newlib/libc/stdio/findfp.c | 8 --------
> 1 file changed, 8 deletions(-)
>
> diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c
> index 118637a18..6933ff1db 100644
> --- a/newlib/libc/stdio/findfp.c
> +++ b/newlib/libc/stdio/findfp.c
> @@ -97,14 +97,6 @@ std (FILE *ptr,
> #else /* _STDIO_CLOSE_STD_STREAMS */
> ptr->_close = NULL;
> #endif /* _STDIO_CLOSE_STD_STREAMS */
> -#if !defined(__SINGLE_THREAD__) && !(defined(_REENT_SMALL) && !defined(_REENT_GLOBAL_STDIO_STREAMS))
> - __lock_init_recursive (ptr->_lock);
> - /*
> - * #else
> - * lock is already initialized in __sfp
> - */
> -#endif
> -
> #ifdef __SCLE
> if (__stextmode (ptr->_file))
> ptr->_flags |= __SCLE;
> --
> 2.35.3
LGTM
Thx,
Corinna
next prev parent reply other threads:[~2022-05-19 12:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-18 17:13 [PATCH] Fix __fp_lock_all() and __fp_unlock_all() Sebastian Huber
2022-05-18 17:13 ` [PATCH] Fix __sFILE::_lock initialization Sebastian Huber
2022-05-19 12:04 ` Corinna Vinschen [this message]
2022-05-18 17:13 ` [PATCH] Use weak reference for _REENT_SMALL Sebastian Huber
2022-05-19 12:05 ` Corinna Vinschen
2022-05-19 12:02 ` [PATCH] Fix __fp_lock_all() and __fp_unlock_all() Corinna Vinschen
2022-05-19 17:08 ` Sebastian Huber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YoYyZQsSiOtsftir@calimero.vinschen.de \
--to=vinschen@redhat.com \
--cc=newlib@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).