< prev index next >
src/os/posix/vm/os_posix.hpp
Print this page
rev 13203 : [mq]: 8183925
@@ -119,17 +119,24 @@
* To be able to use this - don't take locks, don't rely on destructors,
* don't make OS library calls, don't allocate memory, don't print,
* 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;
};
#ifndef SOLARIS
< prev index next >