1 /* native/jni.h - JNI types and data structures
3 Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
4 C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5 E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6 J. Wenninger, Institut f. Computersprachen - TU Wien
8 This file is part of CACAO.
10 This program is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License as
12 published by the Free Software Foundation; either version 2, or (at
13 your option) any later version.
15 This program is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 Contact: cacao@cacaojvm.org
27 Authors: Reinhard Grafl
30 Changes: Christian Thalinger
32 $Id: jni.h 4661 2006-03-21 00:04:59Z motse $
43 #include "vm/global.h"
44 #include "vm/method.h"
47 /* Include the JNI header from GNU Classpath **********************************/
49 #include CLASSPATH_JNI_H
52 /* _Jv_JNIEnv *****************************************************************/
54 typedef struct _Jv_JNIEnv _Jv_JNIEnv;
57 const struct JNINativeInterface *env; /* This MUST be the first entry */
61 /* _Jv_JavaVM *****************************************************************/
63 typedef struct _Jv_JavaVM _Jv_JavaVM;
66 const struct JNIInvokeInterface *functions;/* This MUST be the first entry*/
70 /* CACAO related stuff ********************************************************/
72 extern const struct JNIInvokeInterface _Jv_JNIInvokeInterface;
73 extern struct JNINativeInterface _Jv_JNINativeInterface;
76 /* local reference table ******************************************************/
78 #define LOCALREFTABLE_CAPACITY 16
80 typedef struct localref_table localref_table;
82 /* localref_table **************************************************************
84 ATTENTION: keep this structure a multiple of 8-bytes!!! This is
85 essential for the native stub on 64-bit architectures.
87 *******************************************************************************/
89 struct localref_table {
90 s4 capacity; /* table size */
91 s4 used; /* currently used references */
92 s4 localframes; /* number of current frames */
93 s4 PADDING; /* 8-byte padding */
94 localref_table *prev; /* link to prev table (LocalFrame) */
95 java_objectheader *refs[LOCALREFTABLE_CAPACITY]; /* references */
98 #if defined(USE_THREADS)
99 #define LOCALREFTABLE (THREADINFO->_localref_table)
101 extern localref_table *_no_threads_localref_table;
103 #define LOCALREFTABLE (_no_threads_localref_table)
107 /* initialize JNI subsystem */
110 java_objectheader *_Jv_jni_invokeNative(methodinfo *m, java_objectheader *o,
111 java_objectarray *params);
117 * These are local overrides for various environment variables in Emacs.
118 * Please do not remove this and leave it at the end of the file, where
119 * Emacs will automagically detect them.
120 * ---------------------------------------------------------------------
123 * indent-tabs-mode: t