src/share/classes/java/util/concurrent/ForkJoinPool.java

Print this page

        

*** 2148,2158 **** defaultForkJoinWorkerThreadFactory = new DefaultForkJoinWorkerThreadFactory(); int s; try { UNSAFE = sun.misc.Unsafe.getUnsafe(); ! Class k = ForkJoinPool.class; ctlOffset = UNSAFE.objectFieldOffset (k.getDeclaredField("ctl")); stealCountOffset = UNSAFE.objectFieldOffset (k.getDeclaredField("stealCount")); blockedCountOffset = UNSAFE.objectFieldOffset --- 2148,2158 ---- defaultForkJoinWorkerThreadFactory = new DefaultForkJoinWorkerThreadFactory(); int s; try { UNSAFE = sun.misc.Unsafe.getUnsafe(); ! Class<?> k = ForkJoinPool.class; ctlOffset = UNSAFE.objectFieldOffset (k.getDeclaredField("ctl")); stealCountOffset = UNSAFE.objectFieldOffset (k.getDeclaredField("stealCount")); blockedCountOffset = UNSAFE.objectFieldOffset
*** 2161,2171 **** (k.getDeclaredField("quiescerCount")); scanGuardOffset = UNSAFE.objectFieldOffset (k.getDeclaredField("scanGuard")); nextWorkerNumberOffset = UNSAFE.objectFieldOffset (k.getDeclaredField("nextWorkerNumber")); ! Class a = ForkJoinTask[].class; ABASE = UNSAFE.arrayBaseOffset(a); s = UNSAFE.arrayIndexScale(a); } catch (Exception e) { throw new Error(e); } --- 2161,2171 ---- (k.getDeclaredField("quiescerCount")); scanGuardOffset = UNSAFE.objectFieldOffset (k.getDeclaredField("scanGuard")); nextWorkerNumberOffset = UNSAFE.objectFieldOffset (k.getDeclaredField("nextWorkerNumber")); ! Class<?> a = ForkJoinTask[].class; ABASE = UNSAFE.arrayBaseOffset(a); s = UNSAFE.arrayIndexScale(a); } catch (Exception e) { throw new Error(e); }