Question for Thomas Pfaff regarding stdio and threads

Christopher Faylor cgf@redhat.com
Tue Jan 27 19:39:00 GMT 2004


On Tue, Jan 27, 2004 at 10:01:04AM +0100, Thomas Pfaff wrote:
>AFAICS the problem is that fwalk still uses the thread local reent to 
>walk through the FILE * list.
>
>I think that this can be avoided by changing
>
>  for (g = &ptr->__sglue; g != NULL; g = g->_next)
>
>in fwalk.c to
>
>  for (g = &_GLOBAL_REENT->__sglue; g != NULL; g = g->_next)
>
>like this is already done in findfp.c, since all FILE pointers are now 
>stored in _GLOBAL_REENT aka _impure_ptr.
>
>I did a grep in newlib and the only places where _iobs and _niobs are 
>used are findfp and fwalk, therefore i believe that this will fix it.
>
>I can generate a patch for newlib if you agree with this change.

You know this stuff better than I, but that seems like the right fix to
me.  I'll wait for this patch before releasing 1.5.7.

Thank you!

cgf



More information about the Cygwin-developers mailing list