1 |
|
/* |
2 |
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
|
* Expert Group and released to the public domain, as explained at |
4 |
< |
* http://creativecommons.org/licenses/publicdomain |
4 |
> |
* http://creativecommons.org/publicdomain/zero/1.0/ |
5 |
|
*/ |
6 |
|
|
7 |
|
package jsr166y; |
572 |
|
if (p.casItem(item, e)) { // match |
573 |
|
for (Node q = p; q != h;) { |
574 |
|
Node n = q.next; // update by 2 unless singleton |
575 |
< |
if (head == h && casHead(h, n == null? q : n)) { |
575 |
> |
if (head == h && casHead(h, n == null ? q : n)) { |
576 |
|
h.forgetNext(); |
577 |
|
break; |
578 |
|
} // advance and retry |