src/share/vm/runtime/thread.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/runtime

src/share/vm/runtime/thread.hpp

Print this page




 189  protected:
 190   enum SuspendFlags {
 191     // NOTE: avoid using the sign-bit as cc generates different test code
 192     //       when the sign-bit is used, and sometimes incorrectly - see CR 6398077
 193 
 194     _external_suspend       = 0x20000000U, // thread is asked to self suspend
 195     _ext_suspended          = 0x40000000U, // thread has self-suspended
 196     _deopt_suspend          = 0x10000000U, // thread needs to self suspend for deopt
 197 
 198     _has_async_exception    = 0x00000001U, // there is a pending async exception
 199     _critical_native_unlock = 0x00000002U  // Must call back to unlock JNI critical lock
 200   };
 201 
 202   // various suspension related flags - atomically updated
 203   // overloaded for async exception checking in check_special_condition_for_native_trans.
 204   volatile uint32_t _suspend_flags;
 205 
 206  private:
 207   int _num_nested_signal;
 208 


 209  public:
 210   void enter_signal_handler() { _num_nested_signal++; }
 211   void leave_signal_handler() { _num_nested_signal--; }
 212   bool is_inside_signal_handler() const { return _num_nested_signal > 0; }












 213 
 214  private:
 215   // Active_handles points to a block of handles
 216   JNIHandleBlock* _active_handles;
 217 
 218   // One-element thread local free list
 219   JNIHandleBlock* _free_handle_block;
 220 
 221   // Point to the last handle mark
 222   HandleMark* _last_handle_mark;
 223 
 224   // The parity of the last strong_roots iteration in which this thread was
 225   // claimed as a task.
 226   jint _oops_do_parity;
 227 
 228  public:
 229   void set_last_handle_mark(HandleMark* mark)   { _last_handle_mark = mark; }
 230   HandleMark* last_handle_mark() const          { return _last_handle_mark; }
 231  private:
 232 




 189  protected:
 190   enum SuspendFlags {
 191     // NOTE: avoid using the sign-bit as cc generates different test code
 192     //       when the sign-bit is used, and sometimes incorrectly - see CR 6398077
 193 
 194     _external_suspend       = 0x20000000U, // thread is asked to self suspend
 195     _ext_suspended          = 0x40000000U, // thread has self-suspended
 196     _deopt_suspend          = 0x10000000U, // thread needs to self suspend for deopt
 197 
 198     _has_async_exception    = 0x00000001U, // there is a pending async exception
 199     _critical_native_unlock = 0x00000002U  // Must call back to unlock JNI critical lock
 200   };
 201 
 202   // various suspension related flags - atomically updated
 203   // overloaded for async exception checking in check_special_condition_for_native_trans.
 204   volatile uint32_t _suspend_flags;
 205 
 206  private:
 207   int _num_nested_signal;
 208 
 209   DEBUG_ONLY(bool _suspendible_thread;)
 210 
 211  public:
 212   void enter_signal_handler() { _num_nested_signal++; }
 213   void leave_signal_handler() { _num_nested_signal--; }
 214   bool is_inside_signal_handler() const { return _num_nested_signal > 0; }
 215 
 216 #ifdef ASSERT
 217   void set_suspendible_thread() {
 218     _suspendible_thread = true;
 219   }
 220 
 221   void clear_suspendible_thread() {
 222     _suspendible_thread = false;
 223   }
 224 
 225   bool is_suspendible_thread() { return _suspendible_thread; }
 226 #endif
 227 
 228  private:
 229   // Active_handles points to a block of handles
 230   JNIHandleBlock* _active_handles;
 231 
 232   // One-element thread local free list
 233   JNIHandleBlock* _free_handle_block;
 234 
 235   // Point to the last handle mark
 236   HandleMark* _last_handle_mark;
 237 
 238   // The parity of the last strong_roots iteration in which this thread was
 239   // claimed as a task.
 240   jint _oops_do_parity;
 241 
 242  public:
 243   void set_last_handle_mark(HandleMark* mark)   { _last_handle_mark = mark; }
 244   HandleMark* last_handle_mark() const          { return _last_handle_mark; }
 245  private:
 246 


src/share/vm/runtime/thread.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File