harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Chernyshev" <a.y.chernys...@gmail.com>
Subject Re: [drlvm] DRLVM segfaults in hythread_tls_get()
Date Fri, 07 Jul 2006 14:55:55 GMT
On 7/7/06, Tim Ellison <t.p.ellison@gmail.com> wrote:
> Geir Magnusson Jr wrote:
> > Actually, let me flip this the other way...
> >
> > What are the differences between the impl of the threading lib in DRLVM
> > vs that in classlib?
>
> Yep, that is the right question.  I don't know the answer, perhaps
> whoever made those changes can enlighten us.

I guess these are the key differences:

hythread in drlvm:
- lightweight library which implements just the minimal set of
functions that appeared to be needed for classlib to work, e.g.
monitor_enter/exit and TLS support.
- contains almost no code and delegates directly to APR threading API.

original hythread included with the classlib:
- contains much more extensive threading API, e.g. it adds
wait/notify, interrupt, suspend, sleep, resume e.t.c. - the full set
of threading API which is described in java.lang.Thread and
java.lang.Object classes;
- is platform-dependent, there are two versions for Linux and Windows,
it seems it is written directly on top of win32 API / pthreads
respectively.

Personally, I would prefer to have classlib accessing threading
functionality through the standard Java API like java.lang.Thread or
Object and not using hythread at all, at least this will help VM's to
show more useful debugging information for classlib. For example, VM
knows nothing about hythread native monitors unless VM is building
it's internal threading subsystem on top of the same hythread.
Synchronization problems are tricky to identify and debug and I would
prefer to face them in Java rather than in the native code.

Thanks,
Andrey.


>
> Regards.
> Tim
>
> --
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>
>
> ---------------------------------------------------------------------
> 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
>
>


-- 
Andrey Chernyshev
Intel Middleware Products Division

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


Mime
View raw message