This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: SharedLibLoader patch
- To: Per Bothner <per at bothner dot com>
- Subject: Re: SharedLibLoader patch
- From: Tom Tromey <tromey at redhat dot com>
- Date: 17 Sep 2001 09:16:32 -0600
- Cc: java-patches at gcc dot gnu dot org
- References: <200109040952.f849qXr03167@eureka.bothner.com>
- Reply-To: tromey at redhat dot com
>>>>> "Per" == Per Bothner <per@bothner.com> writes:
Per> This is a preliminary patch for SharedLibLoader, which is a
Per> ClassLoader backed by a shared library.
I finally looked at this. Sorry about the long delay.
Per> (2) Have an autoconf tets for dlopen, and conditionally
Per> compile code in natSharedLibLoader depending on HAVE_DLOPEN
Per> (rather than USE_LTDL).
Per> The latter seems safer and easier. I can add a backup to use
Per> lt_dlopen if dlopen id ! defined(HAVE_DLOPEN) && defined(USE_LTDL).
I think just checking for dlopen in configure fine. If it turns out
to be problematic we can always change things around later.
Per> I've put this clsss in gnu.gcj.runtime, but that may not be best.
Per> It is actually a gnu "extension" class, meant to be used by
Per> applications, rather than an "implementation" class. One might
Per> argue for gnu.gcj.SharedLibLoader.
It's up to you.
Per> +void ::register_hook(jclass cls)
In the GNU style you need a newline after the `void'.
Per> +/* Only used during dlopen, while having a lock on ClassLoader.clsss. */
Per> +static gnu::gcj::runtime::SharedLibLoader* curLoader;
The code actually holds a lock on Class.class, not ClassLoader.class.
Also `class' is misspelled in the comment.
Thanks,
Tom