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

Comparing jsr166/src/jsr166y/ForkJoinPool.java (file contents):
Revision 1.11 by jsr166, Tue Jul 21 00:15:13 2009 UTC vs.
Revision 1.12 by jsr166, Tue Jul 21 18:11:44 2009 UTC

# Line 1818 | Line 1818 | public class ForkJoinPool extends Abstra
1818  
1819      private static long fieldOffset(String fieldName)
1820              throws NoSuchFieldException {
1821 <        return _unsafe.objectFieldOffset
1821 >        return UNSAFE.objectFieldOffset
1822              (ForkJoinPool.class.getDeclaredField(fieldName));
1823      }
1824  
1825 <    static final Unsafe _unsafe;
1825 >    static final Unsafe UNSAFE;
1826      static final long eventCountOffset;
1827      static final long workerCountsOffset;
1828      static final long runControlOffset;
# Line 1831 | Line 1831 | public class ForkJoinPool extends Abstra
1831  
1832      static {
1833          try {
1834 <            _unsafe = getUnsafe();
1834 >            UNSAFE = getUnsafe();
1835              eventCountOffset = fieldOffset("eventCount");
1836              workerCountsOffset = fieldOffset("workerCounts");
1837              runControlOffset = fieldOffset("runControl");
# Line 1843 | Line 1843 | public class ForkJoinPool extends Abstra
1843      }
1844  
1845      private boolean casEventCount(long cmp, long val) {
1846 <        return _unsafe.compareAndSwapLong(this, eventCountOffset, cmp, val);
1846 >        return UNSAFE.compareAndSwapLong(this, eventCountOffset, cmp, val);
1847      }
1848      private boolean casWorkerCounts(int cmp, int val) {
1849 <        return _unsafe.compareAndSwapInt(this, workerCountsOffset, cmp, val);
1849 >        return UNSAFE.compareAndSwapInt(this, workerCountsOffset, cmp, val);
1850      }
1851      private boolean casRunControl(int cmp, int val) {
1852 <        return _unsafe.compareAndSwapInt(this, runControlOffset, cmp, val);
1852 >        return UNSAFE.compareAndSwapInt(this, runControlOffset, cmp, val);
1853      }
1854      private boolean casSpareStack(WaitQueueNode cmp, WaitQueueNode val) {
1855 <        return _unsafe.compareAndSwapObject(this, spareStackOffset, cmp, val);
1855 >        return UNSAFE.compareAndSwapObject(this, spareStackOffset, cmp, val);
1856      }
1857      private boolean casBarrierStack(WaitQueueNode cmp, WaitQueueNode val) {
1858 <        return _unsafe.compareAndSwapObject(this, syncStackOffset, cmp, val);
1858 >        return UNSAFE.compareAndSwapObject(this, syncStackOffset, cmp, val);
1859      }
1860   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines