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

Comparing jsr166/src/main/java/util/concurrent/ForkJoinPool.java (file contents):
Revision 1.67 by jsr166, Wed Jun 8 01:12:17 2011 UTC vs.
Revision 1.68 by jsr166, Wed Jun 8 02:33:47 2011 UTC

# Line 2116 | Line 2116 | public class ForkJoinPool extends Abstra
2116          modifyThreadPermission = new RuntimePermission("modifyThread");
2117          defaultForkJoinWorkerThreadFactory =
2118              new DefaultForkJoinWorkerThreadFactory();
2119        int s;
2119          try {
2120              UNSAFE = sun.misc.Unsafe.getUnsafe();
2121              Class<?> k = ForkJoinPool.class;
# Line 2132 | Line 2131 | public class ForkJoinPool extends Abstra
2131                  (k.getDeclaredField("scanGuard"));
2132              nextWorkerNumberOffset = UNSAFE.objectFieldOffset
2133                  (k.getDeclaredField("nextWorkerNumber"));
2135            Class<?> a = ForkJoinTask[].class;
2136            ABASE = UNSAFE.arrayBaseOffset(a);
2137            s = UNSAFE.arrayIndexScale(a);
2134          } catch (Exception e) {
2135              throw new Error(e);
2136          }
2137 +        Class<?> a = ForkJoinTask[].class;
2138 +        ABASE = UNSAFE.arrayBaseOffset(a);
2139 +        int s = UNSAFE.arrayIndexScale(a);
2140          if ((s & (s-1)) != 0)
2141              throw new Error("data type scale not a power of two");
2142          ASHIFT = 31 - Integer.numberOfLeadingZeros(s);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines