From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: Joel Sherrill <joel@rtems.org>, newlib@sourceware.org
Subject: Re: [PATCH v3 2/2] newlib/.../getreent.c: Do not define if __DYNAMIC_REENT__ is enabled
Date: Thu, 02 Nov 2017 12:08:00 -0000 [thread overview]
Message-ID: <51ed1480-5ca5-08da-b394-e5efeb8a82a7@embedded-brains.de> (raw)
In-Reply-To: <1509139960-28052-2-git-send-email-joel@rtems.org>
On 27/10/17 23:32, Joel Sherrill wrote:
> RTEMS provides the option to have a global or per-thread reentrancy
> as part of application configuration. As part of this, RTEMS provides
> the implementation of __getreent() as appropriate. Allow the target
> to determine if this method is present in libc.a.
> ---
> newlib/libc/reent/getreent.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/newlib/libc/reent/getreent.c b/newlib/libc/reent/getreent.c
> index 60ae6fb..b42a88b 100644
> --- a/newlib/libc/reent/getreent.c
> +++ b/newlib/libc/reent/getreent.c
> @@ -1,5 +1,13 @@
> /* default reentrant pointer when multithread enabled */
>
> +#include <reent.h>
> +
> +#ifdef __DYNAMIC_REENT__
> +
> +int _dummy_getreent;
> +
> +#else
> +
> #include <_ansi.h>
> #include <reent.h>
>
> @@ -12,3 +20,5 @@ _DEFUN_VOID(__getreent)
> {
> return _impure_ptr;
> }
> +
> +#endif
__getreent() is only used if __DYNAMIC_REENT__ is defined:
#if defined(__DYNAMIC_REENT__) && !defined(__SINGLE_THREAD__)
#ifndef __getreent
struct _reent * _EXFUN(__getreent, (void));
#endif
# define _REENT (__getreent())
#else /* __SINGLE_THREAD__ || !__DYNAMIC_REENT__ */
# define _REENT _impure_ptr
#endif /* __SINGLE_THREAD__ || !__DYNAMIC_REENT__ */
Why can't we delete this file (newlib/libc/reent/getreent.c)?
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
next prev parent reply other threads:[~2017-11-02 12:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-27 21:32 [PATCH v3 1/2] newlib/configure.host: Remove obsolete definition of _I386MACH_ALLOW_HW_INTERRUPTS Joel Sherrill
2017-10-31 13:34 ` [PATCH v3 2/2] newlib/.../getreent.c: Do not define if __DYNAMIC_REENT__ is enabled Joel Sherrill
2017-11-02 8:56 ` Corinna Vinschen
2017-11-02 12:08 ` Sebastian Huber [this message]
2017-11-02 17:56 ` Corinna Vinschen
2017-11-02 8:29 ` [PATCH v3 1/2] newlib/configure.host: Remove obsolete definition of _I386MACH_ALLOW_HW_INTERRUPTS Corinna Vinschen
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=51ed1480-5ca5-08da-b394-e5efeb8a82a7@embedded-brains.de \
--to=sebastian.huber@embedded-brains.de \
--cc=joel@rtems.org \
--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).