< prev index next >

src/hotspot/share/runtime/interfaceSupport.inline.hpp

Print this page




   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_INTERFACESUPPORT_HPP
  26 #define SHARE_VM_RUNTIME_INTERFACESUPPORT_HPP
  27 
  28 #include "gc/shared/gcLocker.hpp"
  29 #include "runtime/handles.inline.hpp"
  30 #include "runtime/mutexLocker.hpp"
  31 #include "runtime/orderAccess.hpp"
  32 #include "runtime/os.hpp"
  33 #include "runtime/safepointMechanism.inline.hpp"
  34 #include "runtime/thread.hpp"
  35 #include "utilities/globalDefinitions.hpp"
  36 #include "utilities/macros.hpp"
  37 #include "utilities/preserveException.hpp"
  38 
  39 // Wrapper for all entry points to the virtual machine.
  40 
  41 // InterfaceSupport provides functionality used by the VM_LEAF_BASE and
  42 // VM_ENTRY_BASE macros. These macros are used to guard entry points into
  43 // the VM and perform checks upon leave of the VM.
  44 
  45 
  46 class InterfaceSupport: AllStatic {


 550     VM_QUICK_ENTRY_BASE(result_type, header, thread)
 551 
 552 
 553 #define JVM_LEAF(result_type, header)                                \
 554 extern "C" {                                                         \
 555   result_type JNICALL header {                                       \
 556     VM_Exit::block_if_vm_exited();                                   \
 557     VM_LEAF_BASE(result_type, header)
 558 
 559 
 560 #define JVM_ENTRY_FROM_LEAF(env, result_type, header)                \
 561   { {                                                                \
 562     JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
 563     ThreadInVMfromNative __tiv(thread);                              \
 564     debug_only(VMNativeEntryWrapper __vew;)                          \
 565     VM_ENTRY_BASE_FROM_LEAF(result_type, header, thread)
 566 
 567 
 568 #define JVM_END } }
 569 
 570 #endif // SHARE_VM_RUNTIME_INTERFACESUPPORT_HPP


   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_INTERFACESUPPORT_INLINE_HPP
  26 #define SHARE_VM_RUNTIME_INTERFACESUPPORT_INLINE_HPP
  27 
  28 #include "gc/shared/gcLocker.hpp"
  29 #include "runtime/handles.inline.hpp"
  30 #include "runtime/mutexLocker.hpp"
  31 #include "runtime/orderAccess.hpp"
  32 #include "runtime/os.hpp"
  33 #include "runtime/safepointMechanism.inline.hpp"
  34 #include "runtime/thread.hpp"
  35 #include "utilities/globalDefinitions.hpp"
  36 #include "utilities/macros.hpp"
  37 #include "utilities/preserveException.hpp"
  38 
  39 // Wrapper for all entry points to the virtual machine.
  40 
  41 // InterfaceSupport provides functionality used by the VM_LEAF_BASE and
  42 // VM_ENTRY_BASE macros. These macros are used to guard entry points into
  43 // the VM and perform checks upon leave of the VM.
  44 
  45 
  46 class InterfaceSupport: AllStatic {


 550     VM_QUICK_ENTRY_BASE(result_type, header, thread)
 551 
 552 
 553 #define JVM_LEAF(result_type, header)                                \
 554 extern "C" {                                                         \
 555   result_type JNICALL header {                                       \
 556     VM_Exit::block_if_vm_exited();                                   \
 557     VM_LEAF_BASE(result_type, header)
 558 
 559 
 560 #define JVM_ENTRY_FROM_LEAF(env, result_type, header)                \
 561   { {                                                                \
 562     JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
 563     ThreadInVMfromNative __tiv(thread);                              \
 564     debug_only(VMNativeEntryWrapper __vew;)                          \
 565     VM_ENTRY_BASE_FROM_LEAF(result_type, header, thread)
 566 
 567 
 568 #define JVM_END } }
 569 
 570 #endif // SHARE_VM_RUNTIME_INTERFACESUPPORT_INLINE_HPP
< prev index next >