1 /* src/native/jni.h - JNI types and data structures
3 Copyright (C) 1996-2005, 2006, 2007, 2008
4 CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
6 This file is part of CACAO.
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2, or (at
11 your option) any later version.
13 This program is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 /* jni.h ***********************************************************************
28 ATTENTION: We include this file before we actually define our own
29 jni.h. We do this because otherwise we can get into unresolvable
30 circular header dependencies.
32 This is OK as GNU Classpath defines:
34 #define __CLASSPATH_JNI_MD_H__
35 #define _CLASSPATH_JNI_H
39 #define _JAVASOFT_JNI_MD_H_
40 #define _JAVASOFT_JNI_H_
42 CLASSPATH_JNI_MD_H and CLASSPATH_JNI_H are defined in config.h.
44 *******************************************************************************/
48 /* We include both headers with the absolute path so we can be sure
49 that the preprocessor does not take another header. Furthermore we
50 include jni_md.h before jni.h as the latter includes the former. */
52 #include INCLUDE_JNI_MD_H
53 #include INCLUDE_JNI_H
61 #include "vm/global.h"
63 #include "vmcore/method.h"
66 /* _Jv_JNIEnv *****************************************************************/
68 typedef struct _Jv_JNIEnv _Jv_JNIEnv;
71 const struct JNINativeInterface_ *env; /* This MUST be the first entry */
75 /* _Jv_JavaVM *****************************************************************/
77 typedef struct _Jv_JavaVM _Jv_JavaVM;
80 const struct JNIInvokeInterface_ *functions;/*This MUST be the first entry*/
82 /* JVM instance-specific variables */
84 s8 starttime; /* VM startup time */
86 s4 Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_verbose;
87 s4 Java_gnu_java_lang_management_VMMemoryMXBeanImpl_verbose;
88 s4 java_lang_management_ThreadMXBean_PeakThreadCount;
89 s4 java_lang_management_ThreadMXBean_ThreadCount;
90 s8 java_lang_management_ThreadMXBean_TotalStartedThreadCount;
94 /* CACAO related stuff ********************************************************/
96 extern const struct JNIInvokeInterface_ _Jv_JNIInvokeInterface;
97 extern struct JNINativeInterface_ _Jv_JNINativeInterface;
100 /* hashtable_global_ref_entry *************************************************/
102 typedef struct hashtable_global_ref_entry hashtable_global_ref_entry;
104 struct hashtable_global_ref_entry {
105 java_object_t *o; /* object pointer of global ref */
106 s4 refs; /* references of the current pointer */
107 hashtable_global_ref_entry *hashlink; /* link for external chaining */
111 /* function prototypes ********************************************************/
114 bool jni_version_check(int version);
120 * These are local overrides for various environment variables in Emacs.
121 * Please do not remove this and leave it at the end of the file, where
122 * Emacs will automagically detect them.
123 * ---------------------------------------------------------------------
126 * indent-tabs-mode: t