src/hotspot/share/prims/jvmtiEnv.cpp
changeset 54623 1126f0607c70
parent 54347 235883996bc7
child 58196 cea6839598e8
child 58678 9cf78a70fa4f
equal deleted inserted replaced
54622:a8dcacf95bff 54623:1126f0607c70
   941   if (java_thread->is_hidden_from_external_view()) {
   941   if (java_thread->is_hidden_from_external_view()) {
   942     return (JVMTI_ERROR_NONE);
   942     return (JVMTI_ERROR_NONE);
   943   }
   943   }
   944 
   944 
   945   {
   945   {
   946     MutexLockerEx ml(java_thread->SR_lock(), Mutex::_no_safepoint_check_flag);
   946     MutexLocker ml(java_thread->SR_lock(), Mutex::_no_safepoint_check_flag);
   947     if (java_thread->is_external_suspend()) {
   947     if (java_thread->is_external_suspend()) {
   948       // don't allow nested external suspend requests.
   948       // don't allow nested external suspend requests.
   949       return (JVMTI_ERROR_THREAD_SUSPENDED);
   949       return (JVMTI_ERROR_THREAD_SUSPENDED);
   950     }
   950     }
   951     if (java_thread->is_exiting()) { // thread is in the process of exiting
   951     if (java_thread->is_exiting()) { // thread is in the process of exiting
   981       results[i] = JVMTI_ERROR_NONE;  // indicate successful suspend
   981       results[i] = JVMTI_ERROR_NONE;  // indicate successful suspend
   982       continue;
   982       continue;
   983     }
   983     }
   984 
   984 
   985     {
   985     {
   986       MutexLockerEx ml(java_thread->SR_lock(), Mutex::_no_safepoint_check_flag);
   986       MutexLocker ml(java_thread->SR_lock(), Mutex::_no_safepoint_check_flag);
   987       if (java_thread->is_external_suspend()) {
   987       if (java_thread->is_external_suspend()) {
   988         // don't allow nested external suspend requests.
   988         // don't allow nested external suspend requests.
   989         results[i] = JVMTI_ERROR_THREAD_SUSPENDED;
   989         results[i] = JVMTI_ERROR_THREAD_SUSPENDED;
   990         continue;
   990         continue;
   991       }
   991       }