harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Volosyuk" <ivan.volos...@gmail.com>
Subject Re: [jchevm+classlibadapter] Running classlib tests
Date Fri, 09 Jun 2006 15:15:29 GMT
As far as I can see classlib uses port library libprt.so which is
intended to be used by VM as low level layer above OS threading
system. Some kind of abstraction of underlying OS primitives. The port
library is widely used in classlib. The port library data is
accessible via TLS (it is done imho to support multi VM environments).
To initialize each thread's TLS pointer to the port library the
thread_attach() function is needed.

On 6/9/06, Archie Cobbs <archie@dellroad.org> wrote:
> Ivan Volosyuk wrote:
> > Yes, I have done this in VMThread.run() method for newly created
> > threads. But I have seen no way to do this in JNI's ThreadAttach().
> > Looks like gnu classpath doesn't require any callbacks (like
> > thread_attach()) to be called on the attached thread, so the jchevm
> > doesn't do this. That is why in order to use classlib, this place
> > needs changes in jchevm and it looks like the same applies to all
> > other VMs which use gnu classpath interfaces. That is the problem I am
> > talking about.
> I haven't looked at the code so these may be questions arising from
> ignorance..
> What native code in classlib requires special thread support and why?
> Could we simply override those classes and eliminate this need, and
> just remove (or ignore) the classlib thread stuff?
> Why can't whatever code uses thread_attach() use the normal JNI methods
> for thread management instead?
> JCHEVM should be compatible with any native library that adheres to
> the JNI spec.. but if it requires other "backdoor" functions to be
> supplied by the JVM, then in theory we can eliminate that requirement,
> because after all normal Classpath doesn't require it and it works
> just fine.
> Thanks,
> -Archie

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message