hotspot/src/share/vm/runtime/thread.hpp
changeset 3826 67b89f5a5cac
parent 3261 c7d5aae8d3f7
child 3916 9acd7f9d4f52
equal deleted inserted replaced
3825:6734b8b1adf1 3826:67b89f5a5cac
   965   // external suspend request is completed
   965   // external suspend request is completed
   966   bool is_ext_suspended() const {
   966   bool is_ext_suspended() const {
   967     return (_suspend_flags & _ext_suspended) != 0;
   967     return (_suspend_flags & _ext_suspended) != 0;
   968   }
   968   }
   969 
   969 
   970   // legacy method that checked for either external suspension or vm suspension
       
   971   bool is_any_suspended() const {
       
   972     return is_ext_suspended();
       
   973   }
       
   974 
       
   975   bool is_external_suspend_with_lock() const {
   970   bool is_external_suspend_with_lock() const {
   976     MutexLockerEx ml(SR_lock(), Mutex::_no_safepoint_check_flag);
   971     MutexLockerEx ml(SR_lock(), Mutex::_no_safepoint_check_flag);
   977     return is_external_suspend();
   972     return is_external_suspend();
   978   }
   973   }
   979 
   974 
   995     // flag. This insures that wait_for_ext_suspend_completion()
   990     // flag. This insures that wait_for_ext_suspend_completion()
   996     // will return consistent values.
   991     // will return consistent values.
   997     return ret;
   992     return ret;
   998   }
   993   }
   999 
   994 
  1000   bool is_any_suspended_with_lock() const {
       
  1001     MutexLockerEx ml(SR_lock(), Mutex::_no_safepoint_check_flag);
       
  1002     return is_any_suspended();
       
  1003   }
       
  1004   // utility methods to see if we are doing some kind of suspension
   995   // utility methods to see if we are doing some kind of suspension
  1005   bool is_being_ext_suspended() const            {
   996   bool is_being_ext_suspended() const            {
  1006     MutexLockerEx ml(SR_lock(), Mutex::_no_safepoint_check_flag);
   997     MutexLockerEx ml(SR_lock(), Mutex::_no_safepoint_check_flag);
  1007     return is_ext_suspended() || is_external_suspend();
   998     return is_ext_suspended() || is_external_suspend();
  1008   }
   999   }