< prev index next >

jdk/src/java.base/share/classes/sun/misc/Unsafe.java

Print this page
rev 11228 : 8054494: Remove sun.misc.Unsafe.monitorEnter, monitorExit and tryMonitorEnter
Reviewed-by: dholmes

*** 1,7 **** /* ! * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 843,868 **** /** Allocate an instance but do not run any constructor. Initializes the class if it has not yet been. */ public native Object allocateInstance(Class<?> cls) throws InstantiationException; - /** Lock the object. It must get unlocked via {@link #monitorExit}. */ - public native void monitorEnter(Object o); - - /** - * Unlock the object. It must have been locked via {@link - * #monitorEnter}. - */ - public native void monitorExit(Object o); - - /** - * Tries to lock the object. Returns true or false to indicate - * whether the lock succeeded. If it did, the object must be - * unlocked via {@link #monitorExit}. - */ - public native boolean tryMonitorEnter(Object o); - /** Throw the exception without telling the verifier. */ public native void throwException(Throwable ee); /** --- 843,852 ----
< prev index next >