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

Comparing jsr166/src/jsr166e/LongAdder.java (file contents):
Revision 1.1 by dl, Sun Jul 31 14:20:01 2011 UTC vs.
Revision 1.2 by jsr166, Mon Aug 1 04:18:59 2011 UTC

# Line 130 | Line 130 | public class LongAdder implements Serial
130              code = (h == 0) ? 1 : h;
131          }
132      }
133 <    
133 >
134      /**
135       * The corresponding ThreadLocal class
136       */
# Line 233 | Line 233 | public class LongAdder implements Serial
233                  }
234                  else if (!wasUncontended)       // CAS already known to fail
235                      wasUncontended = true;      // Continue after rehash
236 <                else if (UNSAFE.compareAndSwapLong(a, valueOffset,
236 >                else if (UNSAFE.compareAndSwapLong(a, valueOffset,
237                                                     v = a.value, v + x))
238                      break;
239                  else if (n >= NCPU || cells != as)
# Line 275 | Line 275 | public class LongAdder implements Serial
275                  if (init)
276                      break;
277              }
278 <            else if (UNSAFE.compareAndSwapLong(this, baseOffset,
278 >            else if (UNSAFE.compareAndSwapLong(this, baseOffset,
279                                                 v = base, v + x))
280                  break;                          // Fall back on using base
281          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines