1 /*
2 * Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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 /*
26 * HotSpot integration note:
27 *
28 * This is a consolidation of these two files:
29 * src/share/hpi/export/hpi.h 1.15 99/06/18 JDK1.3 beta build I
30 * src/share/hpi/export/dll.h 1.3 98/09/15 JDK1.3 beta build I
31 * from the classic VM.
32 *
33 * bool_t is a type in the classic VM, and we define it here,
34 * but in the future this should be a jboolean.
35 *
36 * The files are included verbatim expect for local includes removed from hpi.h.
37 */
38
39 #ifndef _JAVASOFT_HPI_H_
40 #define _JAVASOFT_HPI_H_
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45
46 /* A classic VMism that should become a jboolean. Fix in 1.2.1? */
47 typedef enum { HPI_FALSE = 0, HPI_TRUE = 1 } bool_t;
48
49 /*
50 * DLL.H: A common interface for helper DLLs loaded by the VM.
51 * Each library exports the main entry point "DLL_Initialize". Through
52 * that function the programmer can obtain a function pointer which has
53 * type "GetInterfaceFunc." Through the function pointer the programmer
54 * can obtain other interfaces supported in the DLL.
55 */
56 typedef jint (JNICALL * GetInterfaceFunc)
57 (void **intfP, const char *name, jint ver);
58
59 jint JNICALL DLL_Initialize(GetInterfaceFunc *, void *args);
60
297 struct protoent * (*GetProtoByName)(char* name);
298 } HPI_SocketInterface;
299
300 /*
301 * callbacks.
302 */
303 typedef struct vm_calls {
304 int (*jio_fprintf)(FILE *fp, const char *fmt, ...);
305 void (*panic)(const char *fmt, ...);
306 void (*monitorRegister)(sys_mon_t *mid, char *info_str);
307
308 void (*monitorContendedEnter)(sys_thread_t *self, sys_mon_t *mid);
309 void (*monitorContendedEntered)(sys_thread_t *self, sys_mon_t *mid);
310 void (*monitorContendedExit)(sys_thread_t *self, sys_mon_t *mid);
311 } vm_calls_t;
312
313 #ifdef __cplusplus
314 }
315 #endif
316
317 #endif /* !_JAVASOFT_HPI_H_ */
|
1 /*
2 * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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 /*
26 * HotSpot integration note:
27 *
28 * This is a consolidation of these two files:
29 * src/share/hpi/export/hpi.h 1.15 99/06/18 JDK1.3 beta build I
30 * src/share/hpi/export/dll.h 1.3 98/09/15 JDK1.3 beta build I
31 * from the classic VM.
32 *
33 * bool_t is a type in the classic VM, and we define it here,
34 * but in the future this should be a jboolean.
35 *
36 * The files are included verbatim expect for local includes removed from hpi.h.
37 */
38
39 #ifndef SHARE_VM_PRIMS_HPI_IMPORTED_H
40 #define SHARE_VM_PRIMS_HPI_IMPORTED_H
41
42 #include "jni.h"
43
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47
48 /* A classic VMism that should become a jboolean. Fix in 1.2.1? */
49 typedef enum { HPI_FALSE = 0, HPI_TRUE = 1 } bool_t;
50
51 /*
52 * DLL.H: A common interface for helper DLLs loaded by the VM.
53 * Each library exports the main entry point "DLL_Initialize". Through
54 * that function the programmer can obtain a function pointer which has
55 * type "GetInterfaceFunc." Through the function pointer the programmer
56 * can obtain other interfaces supported in the DLL.
57 */
58 typedef jint (JNICALL * GetInterfaceFunc)
59 (void **intfP, const char *name, jint ver);
60
61 jint JNICALL DLL_Initialize(GetInterfaceFunc *, void *args);
62
299 struct protoent * (*GetProtoByName)(char* name);
300 } HPI_SocketInterface;
301
302 /*
303 * callbacks.
304 */
305 typedef struct vm_calls {
306 int (*jio_fprintf)(FILE *fp, const char *fmt, ...);
307 void (*panic)(const char *fmt, ...);
308 void (*monitorRegister)(sys_mon_t *mid, char *info_str);
309
310 void (*monitorContendedEnter)(sys_thread_t *self, sys_mon_t *mid);
311 void (*monitorContendedEntered)(sys_thread_t *self, sys_mon_t *mid);
312 void (*monitorContendedExit)(sys_thread_t *self, sys_mon_t *mid);
313 } vm_calls_t;
314
315 #ifdef __cplusplus
316 }
317 #endif
318
319 #endif // SHARE_VM_PRIMS_HPI_IMPORTED_H
|