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

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

# Line 57 | Line 57 | public class DoubleMaxUpdater extends St
57       */
58      public void update(double x) {
59          long lx = Double.doubleToRawLongBits(x);
60 <        Cell[] as; long b, v; HashCode hc; Cell a; int n;
60 >        Cell[] as; long b, v; int[] hc; Cell a; int n;
61          if ((as = cells) != null ||
62              (Double.longBitsToDouble(b = base) < x && !casBase(b, lx))) {
63              boolean uncontended = true;
64 <            int h = (hc = threadHashCode.get()).code;
65 <            if (as == null || (n = as.length) < 1 ||
66 <                (a = as[(n - 1) & h]) == null ||
64 >            if ((hc = threadHashCode.get()) == null ||
65 >                as == null || (n = as.length) < 1 ||
66 >                (a = as[(n - 1) & hc[0]]) == null ||
67                  (Double.longBitsToDouble(v = a.value) < x &&
68                   !(uncontended = a.cas(v, lx))))
69                  retryUpdate(lx, hc, uncontended);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines