⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 instructions2.doc157.html

📁 Jvm 规范说明。The Java Virtual Machine was designed to support the Java programming language. Some concep
💻 HTML
字号:
<html><head><title>VM Spec  </title></head><body BGCOLOR=#eeeeff text=#000000 LINK=#0000ff VLINK=#000077 ALINK=#ff0000> <a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc156.html">Prev</a> | <a href="Instructions2.doc158.html">Next</a> | <a href="Mnemonics.doc.html">Index</a><hr><br> <a name="monitorenter"></a><h2>monitorenter</h2><a name="131158"></a>The <i>monitorenter</i> instruction may be used with a <i>monitorexit</i> instruction to implement a Java <code>synchronized</code> block. The <i>monitorenter</i> instruction is not used in the implementation of <code>synchronized</code> methods, although it provides equivalent semantics; monitor entry on invocation of a <code>synchronized</code> method is handled implicitly by the Java Virtual Machine's method invocation instructions. See <a href="Compiling.doc.html#6530">&#167;7.14</a>, in <a href="Compiling.doc.html#2989">"Compiling for the Java Virtual Machine,"</a> for more information on the use of the <i>monitorenter</i> and <i>monitorexit</i> instructions.<p><a name="125548"></a>The association of a monitor with an object may be managed in various ways that are beyond the scope of this specification. For instance, the monitor may be allocated and deallocated at the same time as the object. Alternatively, it may be dynamically allocated at the time when a thread attempts to gain exclusive access to the object and freed at some later time when no thread remains in the monitor for the object.<p><a name="125547"></a>The synchronization constructs of the Java Language require support for operations on monitors besides entry and exit, including waiting on a monitor (<code>Object.wait</code>) and notifying other threads waiting in a monitor (<code>Object.notify</code> and <code>Object.notifyAll</code>). These operations are supported in the standard package <code>java.lang</code>, supplied with the Java Virtual Machine. No explicit support for these operations appears in the instruction set of the Java Virtual Machine.<p><hr><!-- This inserts footnotes--><p><a href="VMSpecTOC.doc.html">Contents</a> | <a href="Instructions2.doc156.html">Prev</a> | <a href="Instructions2.doc158.html">Next</a> | <a href="Mnemonics.doc.html">Index</a><p><font size=-1>Java Virtual Machine Specification (HTML generated by dkramer on February 25, 1997)<br><i><a href="Copyright.doc.html">Copyright &#169 1996 Sun Microsystems, Inc.</a>All rights reserved</i><br>Please send any comments or corrections to <a href="mailto:doug.kramer@sun.com">doug.kramer@sun.com</a></font></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -