delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/09/10:18:38

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 9 Mar 2010 10:18:27 -0500
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Cygwin 1.7: Concurrency Issue with Shared State Initialization
Message-ID: <20100309151827.GB29316@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <B10B50309DC54D45A855FD66F56015F71D07C78CAE AT DEWDFECCR03 DOT wdf DOT sap DOT corp> <20100308195656 DOT GA17237 AT ednor DOT casa DOT cgf DOT cx> <B10B50309DC54D45A855FD66F56015F71D07C79605 AT DEWDFECCR03 DOT wdf DOT sap DOT corp> <20100309113608 DOT GH6505 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <20100309113608.GH6505@calimero.vinschen.de>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

On Tue, Mar 09, 2010 at 12:36:08PM +0100, Corinna Vinschen wrote:
>On Mar  9 11:08, Schmidt, Oliver wrote:
>> Hi Christopher,
>> 
>> Fist of all thanks for your immediate feedback :-)
>> 
>> >>    /* Initialize installation root dir. */
>> >>     if (!installation_root[0])
>> >>       init_installation_root ();
>> 
>> > I'll check in something tonight which attempts to solve this problem.
>> 
>> Thanks in advance.
>> 
>> > It's a somewhat tricky problem because adding a mutex here would slow
>> > down every invocation of a cygwin program and we don't want to add to
>> > the "Why is Cygwin so slow???" scenarios if we can help it.
>> 
>> I understand your concern for sure ;-)
>> 
>> Maybe that's the very thing you're thinking about but ... AFAIK a
>> spinlock is the usual paradigm in scenarios where one doesn't
>> anticipate contention but needs to be aware of it 'just in case'. With
>> InterlockedCompareExchange() and Sleep() it should be quite simple to
>> create one that's very efficient in the usual scenario.
>
>Does the below patch fix this for you?

I really do have a patch sitting in my sandbox.  I just forgot to test it
last night.

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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