diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-10 20:36:04 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-10 20:36:04 +0000 |
commit | 77d87cdc3d778d7697fb376b668df581d58fd04d (patch) | |
tree | 83b2914991f41b4c53152d00ff2da8b3917d29df /libjava/include | |
parent | c0211d6b2681a4afeaf40eb4491a6cf9405e57a8 (diff) | |
download | gcc-77d87cdc3d778d7697fb376b668df581d58fd04d.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52144 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/include')
-rw-r--r-- | libjava/include/jni.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libjava/include/jni.h b/libjava/include/jni.h index 6eb04407ad4..b5ce334b895 100644 --- a/libjava/include/jni.h +++ b/libjava/include/jni.h @@ -161,6 +161,7 @@ typedef void *jmethodID; /* Version numbers. */ #define JNI_VERSION_1_1 0x00010001 #define JNI_VERSION_1_2 0x00010002 +#define JNI_VERSION_1_4 0x00010004 /* Used when releasing array elements. */ #define JNI_COMMIT 1 @@ -641,6 +642,10 @@ struct JNINativeInterface void (*DeleteWeakGlobalRef) (JNIEnv *, jweak); jboolean (*ExceptionCheck) (JNIEnv *); + + jobject (*NewDirectByteBuffer) (JNIEnv *, void *, jlong); + void * (*GetDirectBufferAddress) (JNIEnv *, jobject); + jlong (*GetDirectBufferCapacity) (JNIEnv *, jobject); }; #ifdef __cplusplus @@ -1522,6 +1527,15 @@ public: jboolean ExceptionCheck () { return p->ExceptionCheck (this); } + + jobject NewDirectByteBuffer (void *addr, jlong capacity) + { return p->NewDirectByteBuffer (this, addr, capacity); } + + void *GetDirectBufferAddress (jobject buf) + { return p->GetDirectBufferAddress (this, buf); } + + jlong GetDirectBufferCapacity (jobject buf) + { return p->GetDirectBufferCapacity (this, buf); } }; #endif /* __cplusplus */ @@ -1539,6 +1553,7 @@ struct JNIInvokeInterface jint (*AttachCurrentThread) (JavaVM *, void **, void *); jint (*DetachCurrentThread) (JavaVM *); jint (*GetEnv) (JavaVM *, void **, jint); + jint (*AttachCurrentThreadAsDaemon) (JavaVM *, void **, void *); }; #ifdef __cplusplus @@ -1563,6 +1578,9 @@ public: jint GetEnv (void **penv, jint version) { return functions->GetEnv (this, penv, version); } + + jint AttachCurrentThreadAsDaemon (void **penv, void *args) + { return functions->AttachCurrentThreadAsDaemon (this, penv, args); } }; #endif /* __cplusplus */ |