< prev index next >

src/hotspot/share/runtime/thread.cpp

Print this page

        

@@ -1312,13 +1312,11 @@
     }
   }
 }
 
 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);
+  MutexLocker ml(PeriodicTask_lock);
 
   if (_should_terminate) {
     // check for termination before we do any housekeeping or wait
     return 0;  // we did not sleep.
   }

@@ -1425,11 +1423,11 @@
     PeriodicTask::real_time_tick(time_waited);
   }
 
   // Signal that it is terminated
   {
-    MutexLockerEx mu(Terminator_lock, Mutex::_no_safepoint_check_flag);
+    MutexLocker mu(Terminator_lock);
     _watcher_thread = NULL;
     Terminator_lock->notify();
   }
 }
 
< prev index next >