comparison src/share/vm/runtime/thread.cpp @ 11151:5e3b6f79d280

8020701: Avoid crashes in WatcherThread Reviewed-by: acorn, dcubed, dsimms
author rbackman
date Wed, 17 Jul 2013 13:48:15 +0200
parents e619a2766bcc
children 02d7aa1456c9
comparison
equal deleted inserted replaced
11150:c29568b733d2 11151:5e3b6f79d280
1224 1224
1225 WatcherThread* WatcherThread::_watcher_thread = NULL; 1225 WatcherThread* WatcherThread::_watcher_thread = NULL;
1226 bool WatcherThread::_startable = false; 1226 bool WatcherThread::_startable = false;
1227 volatile bool WatcherThread::_should_terminate = false; 1227 volatile bool WatcherThread::_should_terminate = false;
1228 1228
1229 WatcherThread::WatcherThread() : Thread() { 1229 WatcherThread::WatcherThread() : Thread(), _crash_protection(NULL) {
1230 assert(watcher_thread() == NULL, "we can only allocate one WatcherThread"); 1230 assert(watcher_thread() == NULL, "we can only allocate one WatcherThread");
1231 if (os::create_thread(this, os::watcher_thread)) { 1231 if (os::create_thread(this, os::watcher_thread)) {
1232 _watcher_thread = this; 1232 _watcher_thread = this;
1233 1233
1234 // Set the watcher thread to the highest OS priority which should not be 1234 // Set the watcher thread to the highest OS priority which should not be