mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8222811: Consolidate MutexLockerEx and MutexLocker
Make MutexLocker be MutexLockerEx implementation, remove MutexLockerEx calls. Reviewed-by: dcubed, dholmes, pliden, rehn
This commit is contained in:
parent
88303d1c60
commit
fbafef11c0
127 changed files with 718 additions and 746 deletions
|
@ -508,7 +508,7 @@ void ShenandoahControlThread::request_gc(GCCause::Cause cause) {
|
|||
void ShenandoahControlThread::handle_requested_gc(GCCause::Cause cause) {
|
||||
_requested_gc_cause = cause;
|
||||
_gc_requested.set();
|
||||
MonitorLockerEx ml(&_gc_waiters_lock);
|
||||
MonitorLocker ml(&_gc_waiters_lock);
|
||||
while (_gc_requested.is_set()) {
|
||||
ml.wait();
|
||||
}
|
||||
|
@ -528,7 +528,7 @@ void ShenandoahControlThread::handle_alloc_failure(size_t words) {
|
|||
heap->cancel_gc(GCCause::_allocation_failure);
|
||||
}
|
||||
|
||||
MonitorLockerEx ml(&_alloc_failure_waiters_lock);
|
||||
MonitorLocker ml(&_alloc_failure_waiters_lock);
|
||||
while (is_alloc_failure_gc()) {
|
||||
ml.wait();
|
||||
}
|
||||
|
@ -549,7 +549,7 @@ void ShenandoahControlThread::handle_alloc_failure_evac(size_t words) {
|
|||
|
||||
void ShenandoahControlThread::notify_alloc_failure_waiters() {
|
||||
_alloc_failure_gc.unset();
|
||||
MonitorLockerEx ml(&_alloc_failure_waiters_lock);
|
||||
MonitorLocker ml(&_alloc_failure_waiters_lock);
|
||||
ml.notify_all();
|
||||
}
|
||||
|
||||
|
@ -563,7 +563,7 @@ bool ShenandoahControlThread::is_alloc_failure_gc() {
|
|||
|
||||
void ShenandoahControlThread::notify_gc_waiters() {
|
||||
_gc_requested.unset();
|
||||
MonitorLockerEx ml(&_gc_waiters_lock);
|
||||
MonitorLocker ml(&_gc_waiters_lock);
|
||||
ml.notify_all();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue