mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8277090: jsr166 refresh for jdk19
Reviewed-by: alanb, psandoz
This commit is contained in:
parent
c5a0687f80
commit
00e6c63cd1
13 changed files with 2726 additions and 1640 deletions
|
@ -1524,7 +1524,9 @@ public abstract class AbstractQueuedSynchronizer
|
|||
*/
|
||||
private boolean canReacquire(ConditionNode node) {
|
||||
// check links, not status to avoid enqueue race
|
||||
return node != null && node.prev != null && isEnqueued(node);
|
||||
Node p; // traverse unless known to be bidirectionally linked
|
||||
return node != null && (p = node.prev) != null &&
|
||||
(p.next == node || isEnqueued(node));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue