< prev index next >
src/hotspot/share/runtime/thread.cpp
Print this page
*** 1312,1324 ****
}
}
}
int WatcherThread::sleep() const {
! // The WatcherThread does not participate in the safepoint protocol
! // for the PeriodicTask_lock because it is not a JavaThread.
! MutexLockerEx ml(PeriodicTask_lock, Mutex::_no_safepoint_check_flag);
if (_should_terminate) {
// check for termination before we do any housekeeping or wait
return 0; // we did not sleep.
}
--- 1312,1322 ----
}
}
}
int WatcherThread::sleep() const {
! MutexLocker ml(PeriodicTask_lock);
if (_should_terminate) {
// check for termination before we do any housekeeping or wait
return 0; // we did not sleep.
}
*** 1425,1435 ****
PeriodicTask::real_time_tick(time_waited);
}
// Signal that it is terminated
{
! MutexLockerEx mu(Terminator_lock, Mutex::_no_safepoint_check_flag);
_watcher_thread = NULL;
Terminator_lock->notify();
}
}
--- 1423,1433 ----
PeriodicTask::real_time_tick(time_waited);
}
// Signal that it is terminated
{
! MutexLocker mu(Terminator_lock);
_watcher_thread = NULL;
Terminator_lock->notify();
}
}
< prev index next >