8332360: JVM hangs at exit when running on a uniprocessor
Reviewed-by: dholmes, dcubed, shade
This commit is contained in:
parent
c3bc23fe48
commit
4f1a10f84b
@ -987,6 +987,13 @@ void ObjectMonitor::ReenterI(JavaThread* current, ObjectWaiter* currentNode) {
|
||||
guarantee(v == ObjectWaiter::TS_ENTER || v == ObjectWaiter::TS_CXQ, "invariant");
|
||||
assert(owner_raw() != current, "invariant");
|
||||
|
||||
// This thread has been notified so try to reacquire the lock.
|
||||
if (TryLock(current) == TryLockResult::Success) {
|
||||
break;
|
||||
}
|
||||
|
||||
// If that fails, spin again. Note that spin count may be zero so the above TryLock
|
||||
// is necessary.
|
||||
if (TrySpin(current)) {
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user