delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/06/28/06:51:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Dave Korn" <dk AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: higher-level IO very slow with cygwin1.dll 5.10 (due to set_flags?)
Date: Mon, 28 Jun 2004 11:49:11 +0100
MIME-Version: 1.0
In-Reply-To: <20040627002308.GB21664@trixie.casa.cgf.cx>
Message-ID: <NUTMEGyMzvBHFaaqAyy0000058a@NUTMEG.CAM.ARTIMI.COM>
X-OriginalArrivalTime: 28 Jun 2004 10:49:11.0062 (UTC) FILETIME=[8B87A360:01C45CFD]

> -----Original Message-----
> From: cygwin-owner On Behalf Of Christopher Faylor
> Sent: 27 June 2004 01:23

> On Sat, Jun 26, 2004 at 10:45:51PM +0100, Mark Thornton wrote:
> >Pierre A. Humblet wrote:
> >
> >>On Sat, Jun 26, 2004 at 01:09:40PM -0400, Christopher Faylor wrote:
> >> 
> >>
> >>>On Sat, Jun 26, 2004 at 12:05:54PM -0400, Pierre A. Humblet wrote:
> >>>   
> >>>
> >>>>Beware, I found this:
> >>>>2000-05-19  DJ Delorie  <dj AT cygnus DOT com>
> >>>>	* libc/include/stdio.h: no getc/putc macros for cygwin; causes
> >>>>	compatibility issues with different dll versions
> >>>>so you may need to recompile when updating cygwin.
> >>>>     
> >>>>
> >>>Also wouldn't that work around the file locks that were 
> ostensibly put
> >>>there for a reason?
> >>>   
> >>>
> >>
> >>That crossed my mind. But there is no file lock in the 
> macro, which is
> >>used by systems other than cygwin. How do they manage it?
> >>I also assume that single threaded programs don't need the lock.
> >> 
> >Is the lock to ensure that normal POSIX append semantics are obtained
> >when two processes are writing to the same file?  Normal win32
> >behaviour would tend to overwrite whatever had been written by the
> >other process
> 
> No.  newlib is supposed to be OS agnostic.  The locks are certainly
> for multi-threaded purposes.
> 
> Anyone who is interested could always ask in the newlib mailing list.
> newlib sourceware org.
> 
> cgf


  Those flockfile calls are part of Tom Pfaff's recent fixes to make stdio
multithread-safe.  Without them you can't even have multiple threads calling
printf at the same time without their outputs corrupting each other.


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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