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

Comparing jsr166/src/jsr166e/LongMaxUpdater.java (file contents):
Revision 1.8 by jsr166, Mon Jan 14 02:02:41 2013 UTC vs.
Revision 1.9 by dl, Sun May 4 22:38:19 2014 UTC

# Line 48 | Line 48 | public class LongMaxUpdater extends Stri
48       * @param x the value to update
49       */
50      public void update(long x) {
51 <        Cell[] as; long b, v; HashCode hc; Cell a; int n;
51 >        Cell[] as; long b, v; int[] hc; Cell a; int n;
52          if ((as = cells) != null ||
53              (b = base) < x && !casBase(b, x)) {
54              boolean uncontended = true;
55 <            int h = (hc = threadHashCode.get()).code;
56 <            if (as == null || (n = as.length) < 1 ||
57 <                (a = as[(n - 1) & h]) == null ||
55 >            if ((hc = threadHashCode.get()) == null ||
56 >                as == null || (n = as.length) < 1 ||
57 >                (a = as[(n - 1) & hc[0]]) == null ||
58                  ((v = a.value) < x && !(uncontended = a.cas(v, x))))
59                  retryUpdate(x, hc, uncontended);
60          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines