Fixes PR59.
authorChristian Thalinger <twisti@complang.tuwien.ac.at>
Mon, 31 Mar 2008 15:31:53 +0000 (17:31 +0200)
committerChristian Thalinger <twisti@complang.tuwien.ac.at>
Mon, 31 Mar 2008 15:31:53 +0000 (17:31 +0200)
commitb198e6651753955b049ecf361887ded86a841cea
treeed35708b79ff91cd5718cdbbdbe980fbfabe1af4
parent8e89e46b93cccde1d7bce40fcbd7a2e13f55b00c
Fixes PR59.
* src/native/jni.c (_Jv_JNI_Get##name##Field): Added TRACEJNICALLS.
(_Jv_JNI_Set##name##Field): Likewise.
(_Jv_JNI_CallStaticObjectMethod): Likewise.
(_Jv_JNI_CallStaticObjectMethodV): Likewise.
(_Jv_JNI_CallStaticObjectMethodA): Likewise.
(_Jv_JNI_CallStaticVoidMethod): Likewise.
(_Jv_JNI_CallStaticVoidMethodV): Likewise.
(_Jv_JNI_CallStaticVoidMethodA): Likewise.
(_Jv_JNI_GetArrayLength): Likewise.
(_Jv_JNI_Get##name##ArrayElements): Likewise.
(_Jv_JNI_Get##name##ArrayRegion): Likewise.
(jni_attach_current_thread): Check correctly if current thread is
already attached.
(_Jv_JNI_DetachCurrentThread): Check if current thread is already
detached.
* src/threads/posix/threads.c (threads_detach_thread): Likewise.

* src/threads/threads-common.c (threads_init) [WITH_CLASSPATH_SUN]:
Resolve correct thread init method.
(thread_create_object): New function, but not yet implemented.
(thread_create_initial_thread): Lot of changes.

* src/threads/threads-common.h (thread_is_attached): New function.
(thread_current_is_attached): Likewise.

* src/vm/global.h (STR): New macro, stolen from OpenJDK.

* src/vm/vm.c (vm_run): Detach the main thread before calling
vm_destroy.
(vm_destroy): Attach the main thread again as DestroyJavaVM thread.
src/native/jni.c
src/threads/posix/threads.c
src/threads/threads-common.c
src/threads/threads-common.h
src/vm/global.h
src/vm/vm.c