stdio thread safety

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


On Jun 4, 2013, at 11:30 AM, Freddie Chopin <freddie_chopin@op.pl> wrote:

> W dniu 2013-06-04 20:24, Carl Norum pisze:
>> Corinna's message earlier seemed to indicate to me that I was heading the right
>> direction here.
> 
> Well, you are going in the right direction, I just don't think the patch you sent should be in the tree. But that's just my opinion (;
> 
> With some proper assumptions you can live without those locks - I have apps with multiple threads that use stdio and I don't have these locks implemented. So far everything works as expected (;

Yeah - I made some deeper reading of __sinit and __sfp as part of getting this stuff
set up, and it looks like I might not need them after all, as you mention.  Each thread
gets its own FILE structure for each of the standard streams, so the work buffers can't
collide anyway.  I'm just a little apprehensive about it....

-- 
Carl Norum
carl@lytro.com



More information about the Newlib mailing list