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][concurrent] Complete support?
Date Thu, 09 Nov 2006 08:05:48 GMT
On 11/9/06, Nathan Beyer <nbeyer@gmail.com> wrote:
> On 11/8/06, Andrey Chernyshev <a.y.chernyshev@gmail.com> wrote:
> > On 11/8/06, Tim Ellison <t.p.ellison@gmail.com> wrote:
> > > Nathan Beyer wrote:
> > > > Instead of continuing to add functionality to the DRLVM-specific
> > > > Atomics class, I'd like to get a consensus on the Threads/Objects
> > > > (include CAS operations) interfaces in luni-kernel. Then we can get
> >
> > Seems like last time we converged that the accessors package has to be
> > complemented with atomic/volatile operations, but pure-JNI and
> > VM-dependent pieces have to be kept separately (pure pieces would have
> > to go to the luni and VM-dependent pieces would go to kernel). Each
> > accessor also needs to be made singleton with the security check
> > incorporated. Is my understanding correct?
> >
> > The proposed "Threads" interface was just fine.  Nathan, will you be
> > also proposing updates for the accessor interfaces?
>
> Are you referring to the accessor interfaces from the 'misc' module?

Yes, I was meaning accessors from the 'misc' module, in particular these ones:

http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/ObjectAccessor.java?view=markup

http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/ArrayAccessor.java?view=markup

May be we just need to add into this set an "ExtendedObjectAccessor"
with the methods like:
    compareAndSetX(Object o, long fieldID, X expected, X value);
    setXVolatile(Object o, long fieldID, X value);

plus equivalent class "ExtendedArrayAccessor" with methods like:

    compareAndSetX(X[] arr, int index, X expected, X value);
    setXVolatile(X[] arr, int index, X value);

Internally, our Unsafe implementation may choose which accessor to use
(either Array or Object) depending on the object type.

Extended classes may become part of kernel and the "regular" ones can
be kept in luni (as VM-independent).

We can name these classes differently ("Objects" or whatever), if the
*Accessor names do not seem good enough (but I guess it won't change
the meaning).

Thanks,
Andrey.


> Are there some others hanging around?
>
> I'm open to suggestions for additional methods for Objects.
>
> -Nathan
>
> >
> > Thanks,
> > Andrey.
> >
> >
> > > > DRLVM to implement these classes and the donated IBM VM to do the same
> > > > so we can have concurrent support from both VMs.
> > >
> > > +1
> > >
> > > --
> > >
> > > Tim Ellison (t.p.ellison@gmail.com)
> > > IBM Java technology centre, UK.
> > >
> >
> >
> > --
> > Andrey Chernyshev
> > Intel Enterprise Solutions Software Division
> >
>


-- 
Andrey Chernyshev
Intel Middleware Products Division

Mime
View raw message