src/java.base/share/classes/java/util/concurrent/SynchronousQueue.java

Print this page
rev 12972 : 8140606: Update library code to use internal Unsafe
Reviewed-by: duke

*** 281,291 **** boolean isCancelled() { return match == this; } // Unsafe mechanics ! private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); private static final long MATCH; private static final long NEXT; static { try { --- 281,291 ---- boolean isCancelled() { return match == this; } // Unsafe mechanics ! private static final jdk.internal.misc.Unsafe U = jdk.internal.misc.Unsafe.getUnsafe(); private static final long MATCH; private static final long NEXT; static { try {
*** 507,517 **** p = n; } } // Unsafe mechanics ! private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); private static final long HEAD; static { try { HEAD = U.objectFieldOffset (TransferStack.class.getDeclaredField("head")); --- 507,517 ---- p = n; } } // Unsafe mechanics ! private static final jdk.internal.misc.Unsafe U = jdk.internal.misc.Unsafe.getUnsafe(); private static final long HEAD; static { try { HEAD = U.objectFieldOffset (TransferStack.class.getDeclaredField("head"));
*** 573,583 **** boolean isOffList() { return next == this; } // Unsafe mechanics ! private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); private static final long ITEM; private static final long NEXT; static { try { --- 573,583 ---- boolean isOffList() { return next == this; } // Unsafe mechanics ! private static final jdk.internal.misc.Unsafe U = jdk.internal.misc.Unsafe.getUnsafe(); private static final long ITEM; private static final long NEXT; static { try {
*** 815,825 **** } else if (casCleanMe(null, pred)) return; // Postpone cleaning s } } ! private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe(); private static final long HEAD; private static final long TAIL; private static final long CLEANME; static { try { --- 815,825 ---- } else if (casCleanMe(null, pred)) return; // Postpone cleaning s } } ! private static final jdk.internal.misc.Unsafe U = jdk.internal.misc.Unsafe.getUnsafe(); private static final long HEAD; private static final long TAIL; private static final long CLEANME; static { try {