Hi Helmer, On Fri, 2003-07-04 at 23:25, Helmer Krämer wrote: > seems like you're using the unix-jthreads threading system, > right? Have you already tried what happens when you're using > unix-pthreads instead?
Thanks. When configure is given --with-threads=unix-pthreads it works a bit better. No more blocking threads and my other threads seem to actually run now. Good. Attached is my very simple JNI_OnLoad() support patch. But there is still some problem when the glib timer fires so it might be a bit bogus even though it seems to call the correct function when the library is loaded. Cheers, Mark
Index: kaffe/kaffevm/external.c =================================================================== RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/external.c,v retrieving revision 1.46 diff -u -r1.46 external.c --- kaffe/kaffevm/external.c 11 Jun 2003 16:54:14 -0000 1.46 +++ kaffe/kaffevm/external.c 4 Jul 2003 22:43:34 -0000 @@ -115,6 +115,8 @@ extern jint Kaffe_JNI_native(Method*); +extern JavaVM Kaffe_JavaVM; + /* * Error stub function. Point unresolved link errors here to avoid * problems. @@ -316,6 +318,12 @@ #if defined(KAFFE_FEEDBACK) feedbackLibrary(path, true); #endif + + void *func = loadNativeLibrarySym("JNI_OnLoad"); + if (func != NULL) { + JavaVM *jvm = &Kaffe_JavaVM; + jint vers = ((jint(JNICALL *)(JavaVM *, void *))func)(jvm, NULL); + } return index; }