This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: CNI namespace
>>>>> "Cedric" == Cedric Berger <cedric@wireless-networks.com> writes:
Cedric> Ok, but then how will look the CNI functions if you want to
Cedric> store Packet on a global native variable (or a queue, or
Cedric> whatever), for example:
We don't really know.
Right now you can get away with doing this, if the global variable is
in the data section, because the GC scans the data section.
I doubt we want to rely on that long-term. Instead we'll probably add
some sort of root-marking call you can make. Perhaps we can do this
in such a way that the JNI mode will create a GlobalRef for you.
Remember that Paul's approach is really only going to be used for JNI
compatibility, where required. In general we'll still recommend using
CNI with gcj. And, in fact, libgcj will continue to use it. The JNI
compatibility will only be used when building Classpath against a
non-gcj VM.
Tom