ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166y/LinkedTransferQueue.java
(Generate patch)

Comparing jsr166/src/jsr166y/LinkedTransferQueue.java (file contents):
Revision 1.80 by dl, Sat Nov 13 15:47:01 2010 UTC vs.
Revision 1.83 by jsr166, Tue Mar 15 19:47:02 2011 UTC

# Line 1 | Line 1
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;
# Line 572 | Line 572 | public class LinkedTransferQueue<E> exte
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
# Line 797 | Line 797 | public class LinkedTransferQueue<E> exte
797                  lastPred = r;    // next lastPred is old lastRet
798              else if ((b = lastPred) == null || b.isMatched())
799                  lastPred = null; // at start of list
800 <            else {              
800 >            else {
801                  Node s, n;       // help with removal of lastPred.next
802                  while ((s = b.next) != null &&
803                         s != b && s.isMatched() &&
# Line 821 | Line 821 | public class LinkedTransferQueue<E> exte
821                          nextNode = s;
822                          return;
823                      }
824 <                }
824 >                }
825                  else if (item == null)
826                      break;
827                  // assert s.isMatched();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines