src/hotspot/share/gc/g1/g1ConcurrentMarkThread.cpp
changeset 54645 05aaccf7d558
parent 54623 1126f0607c70
child 54756 845f5a35241b
equal deleted inserted replaced
54644:8d52b4c6f9d8 54645:05aaccf7d558
   405 void G1ConcurrentMarkThread::sleep_before_next_cycle() {
   405 void G1ConcurrentMarkThread::sleep_before_next_cycle() {
   406   // We join here because we don't want to do the "shouldConcurrentMark()"
   406   // We join here because we don't want to do the "shouldConcurrentMark()"
   407   // below while the world is otherwise stopped.
   407   // below while the world is otherwise stopped.
   408   assert(!in_progress(), "should have been cleared");
   408   assert(!in_progress(), "should have been cleared");
   409 
   409 
   410   MutexLocker x(CGC_lock, Mutex::_no_safepoint_check_flag);
   410   MonitorLocker ml(CGC_lock, Mutex::_no_safepoint_check_flag);
   411   while (!started() && !should_terminate()) {
   411   while (!started() && !should_terminate()) {
   412     CGC_lock->wait_without_safepoint_check();
   412     ml.wait();
   413   }
   413   }
   414 
   414 
   415   if (started()) {
   415   if (started()) {
   416     set_in_progress();
   416     set_in_progress();
   417   }
   417   }