ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ConcurrentLinkedDeque.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ConcurrentLinkedDeque.java (file contents):
Revision 1.70 by jsr166, Thu Jun 2 15:14:50 2016 UTC vs.
Revision 1.71 by jsr166, Sat Jun 4 19:51:49 2016 UTC

# Line 295 | Line 295 | public class ConcurrentLinkedDeque<E>
295                      continue restartFromHead;
296                  else {
297                      // p is first node
298 <                    NEXT.setRelease(newNode, p); // CAS piggyback
298 >                    NEXT.set(newNode, p); // CAS piggyback
299                      if (PREV.compareAndSet(p, null, newNode)) {
300                          // Successful CAS is the linearization point
301                          // for e to become an element of this deque,
# Line 327 | Line 327 | public class ConcurrentLinkedDeque<E>
327                      continue restartFromTail;
328                  else {
329                      // p is last node
330 <                    PREV.setRelease(newNode, p); // CAS piggyback
330 >                    PREV.set(newNode, p); // CAS piggyback
331                      if (NEXT.compareAndSet(p, null, newNode)) {
332                          // Successful CAS is the linearization point
333                          // for e to become an element of this deque,
# Line 756 | Line 756 | public class ConcurrentLinkedDeque<E>
756              if (h == null)
757                  h = t = newNode;
758              else {
759 <                NEXT.setRelease(t, newNode);
760 <                PREV.setRelease(newNode, t);
759 >                NEXT.set(t, newNode);
760 >                PREV.set(newNode, t);
761                  t = newNode;
762              }
763          }
# Line 774 | Line 774 | public class ConcurrentLinkedDeque<E>
774              else {
775                  // Avoid edge case of a single Node with non-null item.
776                  Node<E> newNode = new Node<E>();
777 <                NEXT.setRelease(t, newNode);
778 <                PREV.setRelease(newNode, t);
777 >                NEXT.set(t, newNode);
778 >                PREV.set(newNode, t);
779                  t = newNode;
780              }
781          }
# Line 1099 | Line 1099 | public class ConcurrentLinkedDeque<E>
1099              if (beginningOfTheEnd == null)
1100                  beginningOfTheEnd = last = newNode;
1101              else {
1102 <                NEXT.setRelease(last, newNode);
1103 <                PREV.setRelease(newNode, last);
1102 >                NEXT.set(last, newNode);
1103 >                PREV.set(newNode, last);
1104                  last = newNode;
1105              }
1106          }
# Line 1120 | Line 1120 | public class ConcurrentLinkedDeque<E>
1120                      continue restartFromTail;
1121                  else {
1122                      // p is last node
1123 <                    PREV.setRelease(beginningOfTheEnd, p); // CAS piggyback
1123 >                    PREV.set(beginningOfTheEnd, p); // CAS piggyback
1124                      if (NEXT.compareAndSet(p, null, beginningOfTheEnd)) {
1125                          // Successful CAS is the linearization point
1126                          // for all elements to be added to this deque.
# Line 1526 | Line 1526 | public class ConcurrentLinkedDeque<E>
1526              if (h == null)
1527                  h = t = newNode;
1528              else {
1529 <                NEXT.setRelease(t, newNode);
1530 <                PREV.setRelease(newNode, t);
1529 >                NEXT.set(t, newNode);
1530 >                PREV.set(newNode, t);
1531                  t = newNode;
1532              }
1533          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines