--- a/src/hotspot/share/runtime/java.cpp Mon Apr 29 14:34:10 2019 -0400
+++ b/src/hotspot/share/runtime/java.cpp Mon Apr 29 16:01:52 2019 -0400
@@ -419,14 +419,14 @@
// A CAS or OSMutex would work just fine but then we need to manipulate
// thread state for Safepoint. Here we use Monitor wait() and notify_all()
// for synchronization.
- { MutexLocker ml(BeforeExit_lock);
+ { MonitorLocker ml(BeforeExit_lock);
switch (_before_exit_status) {
case BEFORE_EXIT_NOT_RUN:
_before_exit_status = BEFORE_EXIT_RUNNING;
break;
case BEFORE_EXIT_RUNNING:
while (_before_exit_status == BEFORE_EXIT_RUNNING) {
- BeforeExit_lock->wait();
+ ml.wait();
}
assert(_before_exit_status == BEFORE_EXIT_DONE, "invalid state");
return;