[Patch] Fix gethwnd race

Jacek Trzmiel sc0rp@hot.pl
Fri May 7 14:51:00 GMT 2004


> On Thu, May 06, 2004 at 07:18:39PM -0500, Brian Ford wrote:
> >Although not the complete rewrite you may have been hoping for, the
> >attached patch does appear to fix the:
> >Winmain: Cannot register window class, Win32 error 1410
> >portion of this bug:
> >http://www.cygwin.com/ml/cygwin/2004-05/msg00232.html

Christopher Faylor wrote:
> Thanks, but, I see that you're using busy loops.  I use those in places
> where I have no choice but to do so or when the potential for a race is
> unlikely.
> 
> I don't think that this is really a situation that qualifies for either.
> It seems like a muto is a cleaner choice here.

I can change it to use critical section.  I just have one question -
where would be good place to put InitializeCriticalSection call?

Best regards,
Jacek.



More information about the Cygwin-patches mailing list