This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Confusion about possibly unsafe malloc_r?
- From: Freddie Chopin <freddie_chopin at op dot pl>
- To: newlib at sourceware dot org
- Date: Sun, 25 Jun 2017 08:15:37 +0200
- Subject: Re: Confusion about possibly unsafe malloc_r?
- Authentication-results: sourceware.org; auth=none
- References: <d2e739ee-6119-1ef2-dc38-fb6a455354d3@nadler.com>
On Sat, 2017-06-24 at 18:42 -0400, Dave Nadler wrote:
> Is this OK? I'm paranoid about thread safety!
Then it's worth mentioning that newlib and FreeRTOS will _NEVER_ be
fully thread safe unless you are using a toolchain with retargetable
locks and your project has support code for these locks.
printf()-style families partially use global reent structure, this is
expected. Trace the calls of the mentioned functions in newlib source
and you'll see that sometimes _GLOBAL_REENT is used, sometimes thread's
reent.
Regards,
FCh