kaffe and java-gnome (Was: [kaffe] System.loadLibrary() should
look in /lib and /usr/lib)
Mark Wielaard
mark@klomp.org
Fri Jul 4 15:45:02 2003
--=-V9YrpMS1+Opjmi2cRRez
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Hi Helmer,
On Fri, 2003-07-04 at 23:25, Helmer Kr=E4mer 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=3Dunix-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
--=-V9YrpMS1+Opjmi2cRRez
Content-Disposition: inline; filename=external.diff
Content-Type: text/x-patch; name=external.diff; charset=iso-8859-1
Content-Transfer-Encoding: 7bit
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;
}
--=-V9YrpMS1+Opjmi2cRRez--