< prev index next >

src/hotspot/share/runtime/thread.hpp

Print this page

592   JFR_ONLY(DEFINE_THREAD_LOCAL_OFFSET_JFR;)
593 
594  public:
595   ParkEvent * volatile _ParkEvent;            // for Object monitors, JVMTI raw monitors,
596                                               // and ObjectSynchronizer::read_stable_mark
597 
598   // Termination indicator used by the signal handler.
599   // _ParkEvent is just a convenient field we can null out after setting the JavaThread termination state
600   // (which can't itself be read from the signal handler if a signal hits during the Thread destructor).
601   bool has_terminated()                       { return AtomicAccess::load(&_ParkEvent) == nullptr; };
602 
603   jint _hashStateW;                           // Marsaglia Shift-XOR thread-local RNG
604   jint _hashStateX;                           // thread-specific hashCode generator state
605   jint _hashStateY;
606   jint _hashStateZ;
607 
608   // Low-level leaf-lock primitives used to implement synchronization.
609   // Not for general synchronization use.
610   static void SpinAcquire(volatile int * Lock);
611   static void SpinRelease(volatile int * Lock);

612 
613 #if defined(__APPLE__) && defined(AARCH64)
614  private:
615   DEBUG_ONLY(bool _wx_init);
616   WXMode _wx_state;
617  public:
618   void init_wx();
619   WXMode enable_wx(WXMode new_state);
620 
621   void assert_wx_state(WXMode expected) {
622     assert(_wx_state == expected, "wrong state");
623   }
624 #endif // __APPLE__ && AARCH64
625 
626  private:
627   bool _in_asgct = false;
628  public:
629   bool in_asgct() const { return _in_asgct; }
630   void set_in_asgct(bool value) { _in_asgct = value; }
631   static bool current_in_asgct() {

592   JFR_ONLY(DEFINE_THREAD_LOCAL_OFFSET_JFR;)
593 
594  public:
595   ParkEvent * volatile _ParkEvent;            // for Object monitors, JVMTI raw monitors,
596                                               // and ObjectSynchronizer::read_stable_mark
597 
598   // Termination indicator used by the signal handler.
599   // _ParkEvent is just a convenient field we can null out after setting the JavaThread termination state
600   // (which can't itself be read from the signal handler if a signal hits during the Thread destructor).
601   bool has_terminated()                       { return AtomicAccess::load(&_ParkEvent) == nullptr; };
602 
603   jint _hashStateW;                           // Marsaglia Shift-XOR thread-local RNG
604   jint _hashStateX;                           // thread-specific hashCode generator state
605   jint _hashStateY;
606   jint _hashStateZ;
607 
608   // Low-level leaf-lock primitives used to implement synchronization.
609   // Not for general synchronization use.
610   static void SpinAcquire(volatile int * Lock);
611   static void SpinRelease(volatile int * Lock);
612   static bool TrySpinAcquire(volatile int * adr);
613 
614 #if defined(__APPLE__) && defined(AARCH64)
615  private:
616   DEBUG_ONLY(bool _wx_init);
617   WXMode _wx_state;
618  public:
619   void init_wx();
620   WXMode enable_wx(WXMode new_state);
621 
622   void assert_wx_state(WXMode expected) {
623     assert(_wx_state == expected, "wrong state");
624   }
625 #endif // __APPLE__ && AARCH64
626 
627  private:
628   bool _in_asgct = false;
629  public:
630   bool in_asgct() const { return _in_asgct; }
631   void set_in_asgct(bool value) { _in_asgct = value; }
632   static bool current_in_asgct() {
< prev index next >