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: stdio thread safety


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



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