src/hotspot/os/windows/osThread_windows.cpp
changeset 58901 2700c409ff10
parent 58196 cea6839598e8
child 59290 97d13893ec3c
--- a/src/hotspot/os/windows/osThread_windows.cpp	Sun Nov 03 14:07:43 2019 +0000
+++ b/src/hotspot/os/windows/osThread_windows.cpp	Sun Nov 03 18:02:29 2019 -0500
@@ -39,28 +39,15 @@
   }
 }
 
-// We need to specialize these to interact with the _interrupt_event.
-
-volatile bool OSThread::interrupted() {
-  return _interrupted != 0 &&
-    (WaitForSingleObject(_interrupt_event, 0) == WAIT_OBJECT_0);
-}
+// We need to specialize this to interact with the _interrupt_event.
 
 void OSThread::set_interrupted(bool z) {
   if (z) {
-    _interrupted = 1;
-    // More than one thread can get here with the same value of osthread,
-    // resulting in multiple notifications.  We do, however, want the store
-    // to interrupted() to be visible to other threads before we post
-    // the interrupt event.
-    OrderAccess::release();
     SetEvent(_interrupt_event);
   }
   else {
     // We should only ever clear the interrupt if we are in fact interrupted,
     // and this can only be done by the current thread on itself.
-    assert(_interrupted == 1, "invariant for clearing interrupt state");
-    _interrupted = 0;
     ResetEvent(_interrupt_event);
   }
 }