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: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


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