natNativeThread.cc: New file.
* gnu/gcj/jni/natNativeThread.cc: New file. * gnu/gcj/jni/NativeThread.java: New file. * java/lang/Thread.java (data): Now a RawData. * include/jvm.h (_Jv_GetCurrentJNIEnv, _Jv_SetCurrentJNIEnv): Declare. * Makefile.in: Rebuilt. * Makefile.am (java/lang/Thread.h): New target. (ordinary_java_source_files): Added NativeThread.java. (nat_source_files): Added natNativeThread.cc. * java/lang/natThread.cc: Include <jni.h> (struct natThread): Added `jni_env' field. (_Jv_GetCurrentJNIEnv): New function. (_Jv_SetCurrentJNIEnv): Likewise. (initialize_native): Initialize jni_env. Include RawData.h. * jni.cc (ThreadGroupClass): New define. (_Jv_JNI_InvokeFunctions): New structure. (JNI_GetCreatedJavaVMs): New function. (the_vm): New global. (JNI_GetDefaultJavaVMInitArgs): New function. Include NativeThread.h. (NativeThreadClass): New define. (_Jv_JNI_EnsureLocalCapacity): Return JNI_ERR, not -1. (_Jv_JNI_DestroyJavaVM): New function. (_Jv_JNI_AttachCurrentThread): New function. (_Jv_JNI_DetachCurrentThread): New function. (_Jv_JNI_GetEnv): New function. (JNI_CreateJavaVM): New function. (_Jv_JNI_GetJavaVM): New function. (_Jv_JNIFunctions): Added entry for GetJavaVM. * include/jni.h (JavaVMAttachArgs): New structure. (JNI_EDETACHED): New define. (JNI_EVERSION): Likewise. (JavaVM): Define properly. (struct JNIInvokeInterface): New structure. (class _Jv_JavaVM): New class. (JNI_OnLoad, JNI_OnUnload): Declare. (JNI_GetDefaultJavaVMInitArgs, JNI_CreateJavaVM, JNI_GetCreatedJavaVMs): Declare. (JavaVMInitArgs): New typedef. (JavaVMOption): Likewise. (JNI_ERR): New define. (JNI_OK): Likewise. From-SVN: r31901
This commit is contained in:
parent
ef86eabb6c
commit
aaf0766e9f
10 changed files with 560 additions and 30 deletions
|
@ -1,6 +1,6 @@
|
|||
// Thread.java - Thread class.
|
||||
|
||||
/* Copyright (C) 1998, 1999 Red Hat, Inc.
|
||||
/* Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -10,6 +10,8 @@ details. */
|
|||
|
||||
package java.lang;
|
||||
|
||||
import gnu.gcj.RawData;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date August 24, 1998
|
||||
|
@ -297,11 +299,8 @@ public class Thread implements Runnable
|
|||
private boolean interrupt_flag;
|
||||
private boolean alive_flag;
|
||||
|
||||
// This is a bit odd. We need a way to represent some data that is
|
||||
// manipulated only by the native side of this class. We represent
|
||||
// it as a Java object reference. However, it is not actually a
|
||||
// Java object.
|
||||
private Object data;
|
||||
// Our native data.
|
||||
private RawData data;
|
||||
|
||||
// Next thread number to assign.
|
||||
private static int nextThreadNumber = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue