harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weldon Washburn" <weldon...@gmail.com>
Subject Re: [classlib] java files that declare native methods -- should they be put in one directory?
Date Fri, 10 Mar 2006 18:51:40 GMT
On 3/10/06, Tim Ellison <t.p.ellison@gmail.com> wrote:
> not sure what you mean here Weldon, that stuff is regular class library
> native code, not VM-specific at all.  They may use JNI calls into the
> VM, and/or the VMI interface to get the portlib etc. but the same code
> should work ok on all VMs.

Tim,
Sorry for the confusion.  Please take a look at the files in
JIRA/Harmony-192/kernel_path.zip.  I had to modify some non-kernel
files to get JCHEVM to work.  While I could have modified JCHEVM, the
goal is to build a generic adapter that will work with any GNU
Classpath ready JVM.  This code is specific to a GNU ready JVM thus
does not belong in Harmony Class Lib.  And it does not belong in a GNU
tree. And it does not belong in JCHEVM tree.

Part of the confusion is that GNU pre-packages some native methods and
thus wants specific interface from java code while HCL philosophy is
"you are on your on" re: native methods.


>
> Regards,
> Tim
>
> Weldon Washburn wrote:
> > Class Lib developers,
> >
> > To make porting Harmony Class Lib to non-Harmony JVMs easier, it would
> > be great if all the java code that declares native methods was in one
> > place.  For the JCEVM port, I added most of the required native method
> > declarations directly to the kernel directory.  I suggest moving the
> > below files to the kernel directory to keep all native related code in
> > one place.  Thoughts?
> >
> >
> > nio/src/main/java/com/ibm/platform/OSMemory.java
> >  - wants to call native methods for stuff like malloc(), free(), memset()
> >
> > nio/src/main/java/com/ibm/platform/OSFileSystem.java
> >  - wants to call native methods for stuff like file lock/unlock(),
> > fflush(), read/write()...
> >
> > luni/src/main/java/java/io/FileDescriptor.java
> >  - wants to call a native method for initializing a new "fd".
> >
> > I have not looked but the following files may also be candidate for
> > moving to the kernel directory:
> >  - OSComponent.java, OSNetworkSystem.java, OSComponentFactory.java
> >
> >
> > --
> > Weldon Washburn
> > Intel Middleware Products Division
> >
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>


--
Weldon Washburn
Intel Middleware Products Division

Mime
View raw message