This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __getreent in libgloss


On 04.11.2014 22:14, Jeff Johnston wrote:
That makes sense if you are going to support multiple threads running on
the cores.

Hi,

perfect, thanks!

There is just one last thing I am not sure about: I (and the most OpenRISC guys) used newlib primarily for baremetal applications (or1k-elf), while the RTEMS port of course uses it differently (say or1k-rtems). I now handle all the reentrany stuff for baremetal in libgloss [1] (is that correct?) and access it from my newlib __getreent [2]. This will of course not work with RTEMS (and therefore maybe not accepted). What is the legitimate way to handle this? Some preprocessor magic? Or am I getting something entirely wrong?

My solution would be: Distinguish between or1k-*-elf and or1k-*-* in configure.host and either set __DYNAMIC_REENT__ and __getreent there or set some defines that are then used in [2].

Thanks again for for quick help.

Best regards,
Stefan

[1]: https://github.com/wallento/or1k-newlib/blob/master/libgloss/or1k/impure.c [2]: https://github.com/wallento/or1k-newlib/blob/master/newlib/libc/machine/or1k/getreent.c

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]