delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/21/07:58:14

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Subject: Re: pthread: thread switching bug?
From: Robert Collins <robert DOT collins AT itdomain DOT com DOT au>
To: cygwin AT cygwin DOT com
Cc: Nemeth Marton <nm127 AT hszk DOT bme DOT hu>
In-Reply-To: <20011016203656.A30680@redhat.com>
References: <3BCCB65E DOT 77D66FE2 AT hszk DOT bme DOT hu>
<20011016203656 DOT A30680 AT redhat DOT com>
X-Mailer: Evolution/0.13 (Preview Release)
Date: 21 Oct 2001 22:01:16 +1000
Message-Id: <1003665677.2183.50.camel@lifelesswks>
Mime-Version: 1.0
X-OriginalArrivalTime: 21 Oct 2001 12:06:01.0852 (UTC) FILETIME=[C0899BC0:01C15A28]

On Wed, 2001-10-17 at 10:36, Christopher Faylor wrote:
> Please check out the project web page for links to available information
> and ports:  http://cygwin.com/ .
> 
> If you don't see what you need there, then the cygwin mailing list is
> the best place to make observations or get questions answered.
> Information on the mailing list is available at the project web page.
> 
> For your convenience, I've reset the Reply-To: address to point to the
> cygwin mailing list.  I've also Cc'ed this reply there.
> 
> On Wed, Oct 17, 2001 at 12:36:14AM +0200, Nemeth Marton wrote:
> >Hi!
> >
> >I have written a little program using threads. If I complie with gcc &
> >run it under Linux, it works fine.
> >
> >But when I complied with cygwin's gcc (used versions bellow), and run it
> >there was some run where not all the newline characters were on the
> >right place, like this:

This simply indicates that the printf is not atomic. The Opengroup spec
for printf does not indicate atomicity as a requirement. It's certainly
not a 'thread switching bug' - thread scheduling is handled via Win32.

It *might* be an issue in newlib, or in the cygwin console fd handler,
neither of which I've checked yet.

Can you see whether you can reproduce the behaviour when writing to a
file, not to stdout? (If you are not using fprintf now, start by trying
with fprintf (stdout,...)). Let me know via the list whether you can
make this happen with a standard file/console with fprintf and we'll
take it from there,

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019