Makefile.in: Rebuilt.
* Makefile.in: Rebuilt. * Makefile.am (java/lang/Thread.h): Mark _Jv_AttachCurrentThreadAsDaemon as friend. * gcj/javaprims.h (_Jv_AttachCurrentThreadAsDaemon): Declare. * gcj/cni.h (JvAttachCurrentThreadAsDaemon): New function. * java/lang/natThread.cc (_Jv_AttachCurrentThreadAsDaemon): New function. * java/lang/natRuntime.cc (_load): Recognize JNI_VERSION_1_4. * jni.cc (_Jv_JNI_GetVersion): Return JNI_VERSION_1_4. (_Jv_JNI_InvokeFunctions): Added _Jv_JNI_AttachCurrentThreadAsDaemon. (_Jv_JNI_GetEnv): Handle JNI_VERSION_1_4. (JNI_GetDefaultJavaVMInitArgs): Likewise. (JNI_CreateJavaVM): Likewise. (_Jv_JNI_AttachCurrentThread): Likewise. (_Jv_JNI_AttachCurrentThread): Added `is_daemon' argument. (_Jv_JNI_AttachCurrentThreadAsDaemon): New method. (_Jv_JNIFunctions): Initialize new fields. (_Jv_JNI_NewDirectByteBuffer): New function. (_Jv_JNI_GetDirectBufferAddress): Likewise. (_Jv_JNI_GetDirectBufferCapacity): Likewise. * include/jni.h (JNI_VERSION_1_4): New macro. (JNIInvokeInterface::AttachCurrentThreadAsDaemon): New field. (_Jv_JavaVM::AttachCurrentThreadAsDaemon): New method. (JNINativeInterface::NewDirectByteBuffer): New field. (JNINativeInterface::GetDirectBufferAddress): New field. (JNINativeInterface::GetDirectBufferCapacity): New field. (_Jv_JNIEnv::NewDirectByteBuffer): New method. (_Jv_JNIEnv::GetDirectBufferAddress): New method. (_Jv_JNIEnv::GetDirectBufferCapacity): New method. From-SVN: r52144
This commit is contained in:
parent
174bf2b1b2
commit
880f8c16ad
9 changed files with 138 additions and 20 deletions
|
@ -1,6 +1,6 @@
|
|||
// natThread.cc - Native part of Thread class.
|
||||
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
|
||||
/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation
|
||||
|
||||
This file is part of libgcj.
|
||||
|
||||
|
@ -410,6 +410,21 @@ _Jv_AttachCurrentThread(jstring name, java::lang::ThreadGroup* group)
|
|||
return thread;
|
||||
}
|
||||
|
||||
java::lang::Thread*
|
||||
_Jv_AttachCurrentThreadAsDaemon(jstring name, java::lang::ThreadGroup* group)
|
||||
{
|
||||
java::lang::Thread *thread = _Jv_ThreadCurrent ();
|
||||
if (thread != NULL)
|
||||
return thread;
|
||||
if (name == NULL)
|
||||
name = java::lang::Thread::gen_name ();
|
||||
thread = new java::lang::Thread (NULL, group, NULL, name);
|
||||
thread->setDaemon (true);
|
||||
_Jv_AttachCurrentThread (thread);
|
||||
_Jv_NotifyThreadStart (thread);
|
||||
return thread;
|
||||
}
|
||||
|
||||
jint
|
||||
_Jv_DetachCurrentThread (void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue