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.74 by jsr166, Tue Jun 28 17:04:12 2016 UTC vs.
Revision 1.75 by jsr166, Sat Sep 10 04:06:51 2016 UTC

# Line 301 | Line 301 | public class ConcurrentLinkedDeque<E>
301                          // for e to become an element of this deque,
302                          // and for newNode to become "live".
303                          if (p != h) // hop two nodes at a time; failure is OK
304 <                            HEAD.weakCompareAndSetVolatile(this, h, newNode);
304 >                            HEAD.weakCompareAndSet(this, h, newNode);
305                          return;
306                      }
307                      // Lost CAS race to another thread; re-read prev
# Line 333 | Line 333 | public class ConcurrentLinkedDeque<E>
333                          // for e to become an element of this deque,
334                          // and for newNode to become "live".
335                          if (p != t) // hop two nodes at a time; failure is OK
336 <                            TAIL.weakCompareAndSetVolatile(this, t, newNode);
336 >                            TAIL.weakCompareAndSet(this, t, newNode);
337                          return;
338                      }
339                      // Lost CAS race to another thread; re-read next
# Line 1124 | Line 1124 | public class ConcurrentLinkedDeque<E>
1124                      if (NEXT.compareAndSet(p, null, beginningOfTheEnd)) {
1125                          // Successful CAS is the linearization point
1126                          // for all elements to be added to this deque.
1127 <                        if (!TAIL.weakCompareAndSetVolatile(this, t, last)) {
1127 >                        if (!TAIL.weakCompareAndSet(this, t, last)) {
1128                              // Try a little harder to update tail,
1129                              // since we may be adding many elements.
1130                              t = tail;
1131                              if (last.next == null)
1132 <                                TAIL.weakCompareAndSetVolatile(this, t, last);
1132 >                                TAIL.weakCompareAndSet(this, t, last);
1133                          }
1134                          return true;
1135                      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines