src/hotspot/share/runtime/objectMonitor.cpp
changeset 59105 76ae9aa0e794
parent 58196 cea6839598e8
child 59156 14fa9e70ae71
equal deleted inserted replaced
59104:046e4024e55a 59105:76ae9aa0e794
  1265   // TODO-FIXME: change the following logic to a loop of the form
  1265   // TODO-FIXME: change the following logic to a loop of the form
  1266   //   while (!timeout && !interrupted && _notified == 0) park()
  1266   //   while (!timeout && !interrupted && _notified == 0) park()
  1267 
  1267 
  1268   int ret = OS_OK;
  1268   int ret = OS_OK;
  1269   int WasNotified = 0;
  1269   int WasNotified = 0;
       
  1270 
       
  1271   // Need to check interrupt state whilst still _thread_in_vm
       
  1272   bool interrupted = interruptible && jt->is_interrupted(false);
       
  1273 
  1270   { // State transition wrappers
  1274   { // State transition wrappers
  1271     OSThread* osthread = Self->osthread();
  1275     OSThread* osthread = Self->osthread();
  1272     OSThreadWaitState osts(osthread, true);
  1276     OSThreadWaitState osts(osthread, true);
  1273     {
  1277     {
  1274       ThreadBlockInVM tbivm(jt);
  1278       ThreadBlockInVM tbivm(jt);
  1275       // Thread is in thread_blocked state and oop access is unsafe.
  1279       // Thread is in thread_blocked state and oop access is unsafe.
  1276       jt->set_suspend_equivalent();
  1280       jt->set_suspend_equivalent();
  1277 
  1281 
  1278       if (interruptible && (jt->is_interrupted(false) || HAS_PENDING_EXCEPTION)) {
  1282       if (interrupted || HAS_PENDING_EXCEPTION) {
  1279         // Intentionally empty
  1283         // Intentionally empty
  1280       } else if (node._notified == 0) {
  1284       } else if (node._notified == 0) {
  1281         if (millis <= 0) {
  1285         if (millis <= 0) {
  1282           Self->_ParkEvent->park();
  1286           Self->_ParkEvent->park();
  1283         } else {
  1287         } else {