hotspot/src/os/posix/vm/os_posix.hpp
changeset 46644 a5813fb66270
parent 46604 d409276ee40c
--- a/hotspot/src/os/posix/vm/os_posix.hpp	Fri Jul 07 23:04:06 2017 +0200
+++ b/hotspot/src/os/posix/vm/os_posix.hpp	Fri Jul 07 23:11:33 2017 +0200
@@ -121,13 +121,20 @@
  * don't call code that could leave the heap / memory in an inconsistent state,
  * or anything else where we are not in control if we suddenly jump out.
  */
-class WatcherThreadCrashProtection : public StackObj {
+class ThreadCrashProtection : public StackObj {
 public:
-  WatcherThreadCrashProtection();
+  static bool is_crash_protected(Thread* thr) {
+    return _crash_protection != NULL && _protected_thread == thr;
+  }
+
+  ThreadCrashProtection();
   bool call(os::CrashProtectionCallback& cb);
 
   static void check_crash_protection(int signal, Thread* thread);
 private:
+  static Thread* _protected_thread;
+  static ThreadCrashProtection* _crash_protection;
+  static volatile intptr_t _crash_mux;
   void restore();
   sigjmp_buf _jmpbuf;
 };