8222811: Consolidate MutexLockerEx and MutexLocker

Make MutexLocker be MutexLockerEx implementation, remove MutexLockerEx calls.

Reviewed-by: dcubed, dholmes, pliden, rehn
This commit is contained in:
Coleen Phillimore 2019-04-25 10:56:31 -04:00
parent 88303d1c60
commit fbafef11c0
127 changed files with 718 additions and 746 deletions

View file

@ -678,7 +678,7 @@ static void *thread_native_entry(Thread *thread) {
// handshaking with parent thread
{
MutexLockerEx ml(sync, Mutex::_no_safepoint_check_flag);
MutexLocker ml(sync, Mutex::_no_safepoint_check_flag);
// notify parent thread
osthread->set_state(INITIALIZED);
@ -686,7 +686,7 @@ static void *thread_native_entry(Thread *thread) {
// wait until os::start_thread()
while (osthread->get_state() == INITIALIZED) {
sync->wait(Mutex::_no_safepoint_check_flag);
sync->wait_without_safepoint_check();
}
}
@ -766,9 +766,9 @@ bool os::create_thread(Thread* thread, ThreadType thr_type,
// Wait until child thread is either initialized or aborted
{
Monitor* sync_with_child = osthread->startThread_lock();
MutexLockerEx ml(sync_with_child, Mutex::_no_safepoint_check_flag);
MutexLocker ml(sync_with_child, Mutex::_no_safepoint_check_flag);
while ((state = osthread->get_state()) == ALLOCATED) {
sync_with_child->wait(Mutex::_no_safepoint_check_flag);
sync_with_child->wait_without_safepoint_check();
}
}
@ -840,7 +840,7 @@ void os::pd_start_thread(Thread* thread) {
OSThread * osthread = thread->osthread();
assert(osthread->get_state() != INITIALIZED, "just checking");
Monitor* sync_with_child = osthread->startThread_lock();
MutexLockerEx ml(sync_with_child, Mutex::_no_safepoint_check_flag);
MutexLocker ml(sync_with_child, Mutex::_no_safepoint_check_flag);
sync_with_child->notify();
}