@Test public void testNextSecondarySeed() { IntStream.range(0, 10).forEach(i -> { out.println(LockSupport.nextSecondarySeed()); }); }
static final int nextSecondarySeed() { int r; Thread t = Thread.currentThread(); if ((r = UNSAFE.getInt(t, SECONDARY)) != 0) { r ^= r << 13; r ^= r >>> 17; r ^= r << 5; } else if ((r = java.util.concurrent.ThreadLocalRandom.current().nextInt()) == 0) { r = 1; } UNSAFE.putInt(t, SECONDARY, r); return r; }
LockSupport { static final int nextSecondarySeed() { int r; Thread t = Thread.currentThread(); if ((r = UNSAFE.getInt(t, SECONDARY)) != 0) { r ^= r << 13; r ^= r >>> 17; r ^= r << 5; } else if ((r = java.util.concurrent.ThreadLocalRandom.current().nextInt()) == 0) { r = 1; } UNSAFE.putInt(t, SECONDARY, r); return r; } }
LockSupport { static final int nextSecondarySeed() { int r; Thread t = Thread.currentThread(); if ((r = UNSAFE.getInt(t, SECONDARY)) != 0) { r ^= r << 13; r ^= r >>> 17; r ^= r << 5; } else if ((r = java.util.concurrent.ThreadLocalRandom.current().nextInt()) == 0) { r = 1; } UNSAFE.putInt(t, SECONDARY, r); return r; } private  LockSupport(); }
LockSupport { static final int nextSecondarySeed() { int r; Thread t = Thread.currentThread(); if ((r = UNSAFE.getInt(t, SECONDARY)) != 0) { r ^= r << 13; r ^= r >>> 17; r ^= r << 5; } else if ((r = java.util.concurrent.ThreadLocalRandom.current().nextInt()) == 0) { r = 1; } UNSAFE.putInt(t, SECONDARY, r); return r; } private  LockSupport(); static void unpark(Thread thread); static void park(Object blocker); static void parkNanos(Object blocker, long nanos); static void parkUntil(Object blocker, long deadline); static Object getBlocker(Thread t); static void park(); static void parkNanos(long nanos); static void parkUntil(long deadline); }
LockSupport { static final int nextSecondarySeed() { int r; Thread t = Thread.currentThread(); if ((r = UNSAFE.getInt(t, SECONDARY)) != 0) { r ^= r << 13; r ^= r >>> 17; r ^= r << 5; } else if ((r = java.util.concurrent.ThreadLocalRandom.current().nextInt()) == 0) { r = 1; } UNSAFE.putInt(t, SECONDARY, r); return r; } private  LockSupport(); static void unpark(Thread thread); static void park(Object blocker); static void parkNanos(Object blocker, long nanos); static void parkUntil(Object blocker, long deadline); static Object getBlocker(Thread t); static void park(); static void parkNanos(long nanos); static void parkUntil(long deadline);  }