This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: SharedLibLoader patch


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]