This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: stdio thread safety
- From: Carl Norum <carl at lytro dot com>
- To: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Tue, 4 Jun 2013 11:05:27 -0700
- Subject: Re: stdio thread safety
- References: <581E2882-C47A-43B3-9CBB-748F86EEE7F1 at lytro dot com> <20130604082112 dot GA28282 at calimero dot vinschen dot de> <4F60FE24-4413-49D8-8D87-894080CA6178 at lytro dot com> <51AE2BD5 dot 1060204 at op dot pl>
On Jun 4, 2013, at 11:03 AM, Freddie Chopin <freddie_chopin@op.pl> wrote:
> W dniu 2013-06-04 19:27, Carl Norum pisze:
>> I've attached a patch that creates a new "sys/arm/sys/lock.h" to override the
>> default lock.h file. It uses the __SINGLE_THREAD__ definition to decide
>> whether or not to include references to the user-defined functions. Is this
>> patch something newlib might want to take? I think it should be pretty
>> generic. Let me know if there are some changes I can make to make it more
>> palatable.
>
> But the patch you sent changes nothing - you still need to recompile newlib to get that working.
>
> 4\/3!!
Yes, but at least it upstreams the interface. Hopefully that would be useful
for people working on this kind of problem in the future. Something like how the
calls to __malloc_lock and __malloc_free (or even any of the system calls like _write_r,
_isatty_r, etc.) are handled in newlib currently.
--
Carl Norum
carl@lytro.com