Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
content-class: urn:content-classes:message
Subject: RE: pthread: thread switching bug?
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Date: Thu, 1 Nov 2001 13:38:03 +1100
X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0
Message-ID: <EA18B9FA0FE4194AA2B4CDB91F73C0EF08F24F@itdomain002.itdomain.net.au>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: pthread: thread switching bug?
Thread-Index: AcFifdSI2hDh9mh9SKi6pgxIid3PXAAABCEw
From: "Robert Collins" <robert.collins@itdomain.com.au>
To: <cygwin@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id fA12Uvf15352

> -----Original Message-----
> From: Christopher Faylor [mailto:cgf@redhat.com]
> >Thanks for the testing, you've shown that there is non 
> thread safe code,
> >probably in the fhandler_consoler in cygwin, or possibly in the MS
> >Windows console code. Right now we don't know which.
> 
> I'm still not sure why this is a cygwin bug.  Is there some 
> requirement
> that writes to the console be atomic?  Your (Robert's) original email
> indicated that the Opengroup spec didn't have this as a requirement.

It's non expected behaviour at the least. At worst it could be a symptom
of something more serious that is faulty. I intend to analyse it at some
point. 

The Opengroup spec for printf doesn't document any thead safety needs,
but, one would expect fprintf to a file to be atomic regardless of the
actual file... There are separate thread considerations elsewhere in
that tome, but I don't have time to dig them up right now.

Rob

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

