This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin 1.7: Concurrency Issue with Shared State Initialization


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 = InterlockedCompareExchange (&installation_root_init, 1L, 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]