harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r540700 - /harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_basic.c
Date Tue, 22 May 2007 19:01:15 GMT
Author: gshimansky
Date: Tue May 22 12:01:14 2007
New Revision: 540700

URL: http://svn.apache.org/viewvc?view=rev&rev=540700
Log:
Applied HARMONY-3892 [drlvm][thread] Deadlock during thread creation from custom sytem classloader


Modified:
    harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_basic.c

Modified: harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_basic.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_basic.c?view=diff&rev=540700&r1=540699&r2=540700
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_basic.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/thread/src/thread_java_basic.c Tue May 22 12:01:14 2007
@@ -31,7 +31,7 @@
 #define LOG_DOMAIN "tm.java"
 
 void stop_callback(void);
-jmethodID getRunMethod(JNIEnv *env);
+jmethodID getRunMethod(JNIEnv *env, jthread java_thread);
 IDATA increase_nondaemon_threads_count(hythread_t self);
 IDATA countdown_nondaemon_threads(hythread_t self);
 
@@ -99,7 +99,7 @@
         data->tiProc(data->tiEnv, jni_env, data->tiProcArgs);
     } else {
         // for jthread_create();
-        (*jni_env) -> CallVoidMethodA(jni_env, java_thread, getRunMethod(jni_env), NULL);
+        (*jni_env) -> CallVoidMethodA(jni_env, java_thread, getRunMethod(jni_env, java_thread),
NULL);
     }
     
     status = jthread_detach(java_thread);
@@ -705,7 +705,7 @@
     (*env) -> ThrowNew(env, clazz, "Park() is interrupted");
 }
 
-jmethodID getRunMethod(JNIEnv *env) {
+jmethodID getRunMethod(JNIEnv *env, jthread java_thread) {
     jclass clazz;
     static jmethodID run_method = NULL;
     IDATA status;
@@ -714,7 +714,7 @@
     assert(status == TM_ERROR_NONE);
     //printf("run method find enter\n");
     if (!run_method) {
-        clazz = (*env) -> FindClass(env, "java/lang/Thread");
+        clazz = (*env) -> GetObjectClass(env, java_thread);
         run_method = (*env) -> GetMethodID(env, clazz, "runImpl", "()V");
     }
     status=release_start_lock();



Mime
View raw message