src/hotspot/os/windows/os_windows.cpp
changeset 59251 4cbfa5077d68
parent 59247 56bf71d64d51
child 59252 623722a6aeb9
equal deleted inserted replaced
59250:a6deb69743d4 59251:4cbfa5077d68
  5234   // that it will take two back-to-back park() calls for the owning
  5234   // that it will take two back-to-back park() calls for the owning
  5235   // thread to block. This has the benefit of forcing a spurious return
  5235   // thread to block. This has the benefit of forcing a spurious return
  5236   // from the first park() call after an unpark() call which will help
  5236   // from the first park() call after an unpark() call which will help
  5237   // shake out uses of park() and unpark() without condition variables.
  5237   // shake out uses of park() and unpark() without condition variables.
  5238 
  5238 
  5239   if (Atomic::xchg(1, &_Event) >= 0) return;
  5239   if (Atomic::xchg(&_Event, 1) >= 0) return;
  5240 
  5240 
  5241   ::SetEvent(_ParkHandle);
  5241   ::SetEvent(_ParkHandle);
  5242 }
  5242 }
  5243 
  5243 
  5244 
  5244