8257831: Suspend with handshakes

Reviewed-by: dcubed, rrich, dholmes, pchilanomate, sspitsyn
This commit is contained in:
Robbin Ehn 2021-04-22 10:30:47 +00:00
parent 28af31db34
commit 86bd44fe80
40 changed files with 470 additions and 1081 deletions

View file

@ -259,10 +259,9 @@ class MonitorLocker: public MutexLocker {
assert(monitor != NULL, "NULL monitor not allowed");
}
bool wait(int64_t timeout = 0,
bool as_suspend_equivalent = !Mutex::_as_suspend_equivalent_flag) {
bool wait(int64_t timeout = 0) {
if (_flag == Mutex::_safepoint_check_flag) {
return as_monitor()->wait(timeout, as_suspend_equivalent);
return as_monitor()->wait(timeout);
} else {
return as_monitor()->wait_without_safepoint_check(timeout);
}