src/hotspot/os/posix/os_posix.cpp
changeset 59105 76ae9aa0e794
parent 58744 c9c3bb79861e
child 59251 4cbfa5077d68
--- a/src/hotspot/os/posix/os_posix.cpp	Fri Nov 15 09:06:58 2019 +0800
+++ b/src/hotspot/os/posix/os_posix.cpp	Thu Nov 14 22:36:40 2019 -0500
@@ -2075,10 +2075,12 @@
   // the ThreadBlockInVM() CTOR and DTOR may grab Threads_lock.
   ThreadBlockInVM tbivm(jt);
 
+  // Can't access interrupt state now that we are _thread_blocked. If we've
+  // been interrupted since we checked above then _counter will be > 0.
+
   // Don't wait if cannot get lock since interference arises from
-  // unparking. Also re-check interrupt before trying wait.
-  if (jt->is_interrupted(false) ||
-      pthread_mutex_trylock(_mutex) != 0) {
+  // unparking.
+  if (pthread_mutex_trylock(_mutex) != 0) {
     return;
   }