This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: Question for Thomas Pfaff regarding stdio and threads
- From: Christopher Faylor <cgf at redhat dot com>
- To: cygwin-developers at cygwin dot com
- Cc: tpfaff at gmx dot net
- Date: Tue, 27 Jan 2004 14:39:40 -0500
- Subject: Re: Question for Thomas Pfaff regarding stdio and threads
- References: <20040126191724.GA16810@redhat.com> <401628D0.1090500@gmx.net>
- Reply-to: cygwin-developers at cygwin dot com
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