src/hotspot/share/runtime/thread.hpp
changeset 54631 3a3e4e473622
parent 54623 1126f0607c70
child 54647 c0d9bc9b4e1f
equal deleted inserted replaced
54630:04b17e84c87d 54631:3a3e4e473622
   284     // NOTE: avoid using the sign-bit as cc generates different test code
   284     // NOTE: avoid using the sign-bit as cc generates different test code
   285     //       when the sign-bit is used, and sometimes incorrectly - see CR 6398077
   285     //       when the sign-bit is used, and sometimes incorrectly - see CR 6398077
   286 
   286 
   287     _external_suspend       = 0x20000000U, // thread is asked to self suspend
   287     _external_suspend       = 0x20000000U, // thread is asked to self suspend
   288     _ext_suspended          = 0x40000000U, // thread has self-suspended
   288     _ext_suspended          = 0x40000000U, // thread has self-suspended
   289     _deopt_suspend          = 0x10000000U, // thread needs to self suspend for deopt
       
   290 
   289 
   291     _has_async_exception    = 0x00000001U, // there is a pending async exception
   290     _has_async_exception    = 0x00000001U, // there is a pending async exception
   292     _critical_native_unlock = 0x00000002U, // Must call back to unlock JNI critical lock
   291     _critical_native_unlock = 0x00000002U, // Must call back to unlock JNI critical lock
   293 
   292 
   294     _trace_flag             = 0x00000004U  // call tracing backend
   293     _trace_flag             = 0x00000004U  // call tracing backend
  1403   bool is_thread_fully_suspended(bool wait_for_suspend, uint32_t *bits);
  1402   bool is_thread_fully_suspended(bool wait_for_suspend, uint32_t *bits);
  1404 
  1403 
  1405   inline void set_external_suspend();
  1404   inline void set_external_suspend();
  1406   inline void clear_external_suspend();
  1405   inline void clear_external_suspend();
  1407 
  1406 
  1408   inline void set_deopt_suspend();
       
  1409   inline void clear_deopt_suspend();
       
  1410   bool is_deopt_suspend()         { return (_suspend_flags & _deopt_suspend) != 0; }
       
  1411 
       
  1412   bool is_external_suspend() const {
  1407   bool is_external_suspend() const {
  1413     return (_suspend_flags & _external_suspend) != 0;
  1408     return (_suspend_flags & _external_suspend) != 0;
  1414   }
  1409   }
  1415   // Whenever a thread transitions from native to vm/java it must suspend
  1410   // Whenever a thread transitions from native to vm/java it must suspend
  1416   // if external|deopt suspend is present.
  1411   // if external|deopt suspend is present.
  1417   bool is_suspend_after_native() const {
  1412   bool is_suspend_after_native() const {
  1418     return (_suspend_flags & (_external_suspend | _deopt_suspend JFR_ONLY(| _trace_flag))) != 0;
  1413     return (_suspend_flags & (_external_suspend JFR_ONLY(| _trace_flag))) != 0;
  1419   }
  1414   }
  1420 
  1415 
  1421   // external suspend request is completed
  1416   // external suspend request is completed
  1422   bool is_ext_suspended() const {
  1417   bool is_ext_suspended() const {
  1423     return (_suspend_flags & _ext_suspended) != 0;
  1418     return (_suspend_flags & _ext_suspended) != 0;