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: [classlib][drlvm] integrating j.u.c with drlvm
Date Mon, 07 Aug 2006 12:50:11 GMT
On 8/7/06, Nathan Beyer <nbeyer@kc.rr.com> wrote:
>
>
> > -----Original Message-----
> > From: Geir Magnusson Jr [mailto:geir@pobox.com]
> >
> > On of the technical things we have to do still for java.util.concurrent
> > is to create sun.misc.Unsafe for the VMs and see how things work together.
> >
> > How much work will it be for DRLVM?
>
> Some of it seems to be available in a class called
> "org.apache.harmony.util.concurrent.Atomics", at least the CAS stuff.
> There's a replacement for java.util.concurrent.locks.LockSupport in the
> DRLVM source that has a JNI complement, but this will need to be converted
> to be used within sun.misc.Unsafe.
>
> The other major missing piece is the object field manipulation and the
> volatile set of those fields as well. Some of this may already be available,
> but I don't know for sure.

Would the accessors package available at
classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors
suite these needs? May be the ObjectAccessor and ArrayAccessor classes
could help. They don't, however, provide a volatile access support
yet. But, it probably can be added with the help of
MemoryReadWriteBarrier() function defined in
drlvm/trunk/vm/vmcore/include/atomics.h.

BTW: what if we use a simple access instead of the volatile one for a
while, is this API frequently used (compared to the other
util.concurrent ones)? May be we could adopt concurrent in several
steps. First, add lock support and the basic CAS operations, then add
volatile access e.t.c.

Thanks,
Andrey.

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