< prev index next >
src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java
Print this page
@@ -139,11 +139,11 @@
public class LockSupport {
private LockSupport() {} // Cannot be instantiated.
private static void setBlocker(Thread t, Object arg) {
// Even though volatile, hotspot doesn't need a write barrier here.
- U.putObject(t, PARKBLOCKER, arg);
+ U.putReference(t, PARKBLOCKER, arg);
}
/**
* Makes available the permit for the given thread, if it
* was not already available. If the thread was blocked on
@@ -289,11 +289,11 @@
* @since 1.6
*/
public static Object getBlocker(Thread t) {
if (t == null)
throw new NullPointerException();
- return U.getObjectVolatile(t, PARKBLOCKER);
+ return U.getReferenceVolatile(t, PARKBLOCKER);
}
/**
* Disables the current thread for thread scheduling purposes unless the
* permit is available.
< prev index next >