stdio thread safety

Freddie Chopin freddie_chopin@op.pl
Tue Jun 4 18:11:00 GMT 2013


W dniu 2013-06-04 20:05, Carl Norum pisze:
> 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.

But do note, that empty __malloc_lock() and __malloc_unlock() are 
provided, so that everything works as expected if you don't need them. 
In case of stdio it can't be done that easily, because - as you noted - 
there's this LOCK_INIT() macro for static locks... And your patch just 
provides another set of names for the ones already used, without 
providing any implementation...

4\/3!!



More information about the Newlib mailing list