[Patch] Fix gethwnd race

Brian Ford ford@vss.fsi.com
Sat May 15 00:33:00 GMT 2004

Ugh!  Ok, this falls under the "too much list noise" category, so I'll
just shut up now.

On Fri, 14 May 2004, Brian Ford wrote:

+  HANDLE ws;
+  if (InterlockedDecrement (&window_waiters) == 0
+      && (ws = (HANDLE) InterlockedExchange ((long *) &window_started, 0)))
+    CloseHandle (ws);

This part now simplifies to just:

if (InterlockedDecrement (&window_waiters) == 0)
  CloseHandle (window_waiters);

after the fatal error change.

Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...

More information about the Cygwin-patches mailing list