delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/10/04:55:28

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-10.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI
X-Spam-Check-By: sourceware.org
From: "Schmidt, Oliver" <oliv DOT schmidt AT sap DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Date: Wed, 10 Mar 2010 10:55:04 +0100
Subject: Re: Cygwin 1.7: Concurrency Issue with Shared State Initialization
Message-ID: <B10B50309DC54D45A855FD66F56015F71D07D2ABBC@DEWDFECCR03.wdf.sap.corp>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

Hi Corrina,

Thanks for your involvement :-)

>> [...] a spinlock [...] 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'll test the snapshot asap!

[...]
+      LONG init =3D InterlockedCompareExchange (&installation_root_init, 1=
L, 0L);
[...]
+	  low_priority_sleep (0);
[...]

I see we were thinking along the same lines ;-)

Regards, Oliver

--
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