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

Comparing jsr166/src/jsr166e/ConcurrentHashMapV8.java (file contents):
Revision 1.103 by jsr166, Wed Jun 19 16:22:44 2013 UTC vs.
Revision 1.106 by jsr166, Wed Jun 19 17:11:57 2013 UTC

# Line 2422 | Line 2422 | public class ConcurrentHashMapV8<K,V>
2422                                      ++hc;
2423                                  }
2424                              }
2425 <                            ln = (lc <= UNTREEIFY_THRESHOLD ?  untreeify(lo) :
2426 <                                  (hc != 0) ? new TreeBin<K,V>(lo) : t);
2427 <                            hn = (hc <= UNTREEIFY_THRESHOLD ? untreeify(hi) :
2428 <                                  (lc != 0) ? new TreeBin<K,V>(hi) : t);
2425 >                            ln = (lc <= UNTREEIFY_THRESHOLD) ? untreeify(lo) :
2426 >                                (hc != 0) ? new TreeBin<K,V>(lo) : t;
2427 >                            hn = (hc <= UNTREEIFY_THRESHOLD) ? untreeify(hi) :
2428 >                                (lc != 0) ? new TreeBin<K,V>(hi) : t;
2429                          }
2430                          else
2431                              ln = hn = null;
# Line 2475 | Line 2475 | public class ConcurrentHashMapV8<K,V>
2475      }
2476  
2477      /**
2478 <     * Returns a list on non-TreeNodes replacing those in given list
2478 >     * Returns a list on non-TreeNodes replacing those in given list.
2479       */
2480      static <K,V> Node<K,V> untreeify(Node<K,V> b) {
2481          Node<K,V> hd = null, tl = null;
# Line 2613 | Line 2613 | public class ConcurrentHashMapV8<K,V>
2613          }
2614  
2615          /**
2616 <         * Acquires write lock for tree restructuring
2616 >         * Acquires write lock for tree restructuring.
2617           */
2618          private final void lockRoot() {
2619              if (!U.compareAndSwapInt(this, LOCKSTATE, 0, WRITER))
# Line 2621 | Line 2621 | public class ConcurrentHashMapV8<K,V>
2621          }
2622  
2623          /**
2624 <         * Releases write lock for tree restructuring
2624 >         * Releases write lock for tree restructuring.
2625           */
2626          private final void unlockRoot() {
2627              lockState = 0;
2628          }
2629  
2630          /**
2631 <         * Possibly blocks awaiting root lock
2631 >         * Possibly blocks awaiting root lock.
2632           */
2633          private final void contendedLock() {
2634              boolean waiting = false;
# Line 2751 | Line 2751 | public class ConcurrentHashMapV8<K,V>
2751           * that are accessible independently of lock. So instead we
2752           * swap the tree linkages.
2753           *
2754 <         * @return true if now too small so should be untreeified.
2754 >         * @return true if now too small, so should be untreeified
2755           */
2756          final boolean removeTreeNode(TreeNode<K,V> p) {
2757              TreeNode<K,V> next = (TreeNode<K,V>)p.next;
# Line 3146 | Line 3146 | public class ConcurrentHashMapV8<K,V>
3146  
3147      /**
3148       * Base of key, value, and entry Iterators. Adds fields to
3149 <     * Traverser to support iterator.remove
3149 >     * Traverser to support iterator.remove.
3150       */
3151      static class BaseIterator<K,V> extends Traverser<K,V> {
3152          final ConcurrentHashMapV8<K,V> map;
# Line 5986 | Line 5986 | public class ConcurrentHashMapV8<K,V>
5986      }
5987  
5988      /**
5989 <     * Generates initial value for per-thread CounterHashCodes
5989 >     * Generates initial value for per-thread CounterHashCodes.
5990       */
5991      static final AtomicInteger counterHashCodeGenerator = new AtomicInteger();
5992  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines