hotspot/src/share/vm/runtime/thread.hpp
changeset 18943 7d0ef675e808
parent 18938 ff8f8cec9434
child 19696 bd5a0131bde1
child 22823 40b2c6c30123
equal deleted inserted replaced
18942:705506c1bf49 18943:7d0ef675e808
   731  private:
   731  private:
   732   static WatcherThread* _watcher_thread;
   732   static WatcherThread* _watcher_thread;
   733 
   733 
   734   static bool _startable;
   734   static bool _startable;
   735   volatile static bool _should_terminate; // updated without holding lock
   735   volatile static bool _should_terminate; // updated without holding lock
       
   736 
       
   737   os::WatcherThreadCrashProtection* _crash_protection;
   736  public:
   738  public:
   737   enum SomeConstants {
   739   enum SomeConstants {
   738     delay_interval = 10                          // interrupt delay in milliseconds
   740     delay_interval = 10                          // interrupt delay in milliseconds
   739   };
   741   };
   740 
   742 
   757   static void start();
   759   static void start();
   758   static void stop();
   760   static void stop();
   759   // Only allow start once the VM is sufficiently initialized
   761   // Only allow start once the VM is sufficiently initialized
   760   // Otherwise the first task to enroll will trigger the start
   762   // Otherwise the first task to enroll will trigger the start
   761   static void make_startable();
   763   static void make_startable();
       
   764 
       
   765   void set_crash_protection(os::WatcherThreadCrashProtection* crash_protection) {
       
   766     assert(Thread::current()->is_Watcher_thread(), "Can only be set by WatcherThread");
       
   767     _crash_protection = crash_protection;
       
   768   }
       
   769 
       
   770   bool has_crash_protection() const { return _crash_protection != NULL; }
       
   771   os::WatcherThreadCrashProtection* crash_protection() const { return _crash_protection; }
   762 
   772 
   763  private:
   773  private:
   764   int sleep() const;
   774   int sleep() const;
   765 };
   775 };
   766 
   776