vfscanf in newlib

Robert Collins robert.collins@itdomain.com.au
Sat Apr 21 07:05:00 GMT 2001


----- Original Message -----
From: "Charles Wilson" <cwilson@ece.gatech.edu>
To: "Robert Collins" <robert.collins@itdomain.com.au>
Cc: <cygwin-developers@cygwin.com>; <jjohnstn@cygnus.com>
Sent: Saturday, April 21, 2001 3:21 PM
Subject: Re: vfscanf in newlib


> Robert Collins wrote:
> >
> > A __cursory__ conde read through gives me the impression that
> > simultaneous calls with the same file may result in undefined
results.
> >
> > buffer wise it should be ok, but don't use the same handle twice. I
> > don't know that the SUS has to say about the _r function w.r.t. the
file
> > in use, but I would expect that two calls from two threads to one of
the
> > _r functions should result in one blocking until the other finishes
> > scnaning, not them interleaving fread calls.
> >
> > I may be completely off-base here though.
>
> Maybe.  I just discovered something -- which *MAY* be related to my
> changes, or *MAY& be related to other changes.  I've built three
> cygwin1.dll's in the last two days.

I'm looking at the original function that you are wrapping: I don't
think your changes will make it worse, just that the _r functions may be
reentrant, but not threadsafe. That may be an issue with increasing
threaded applications on cygwin...

I don't think this should stop the code going in, just that someone
should go through that code carefully.

Rob



More information about the Cygwin-developers mailing list