stdio thread safety

Carl Norum carl@lytro.com
Tue Jun 4 18:05:00 GMT 2013


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




More information about the Newlib mailing list