[rvm-research] AddressArray with CAS

Nachshon Cohen O <[email protected]>
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <[email protected]>
Hi

I'm trying to use a wait free queue implementation in the Jikes RVM.
The implementation holds an array of addresses, and I'd like to apply CAS (compareAndSet) to these addresses.
For example:
AddressArray arr = AddressArray.create(10);
arr[ 3 ].compareAndSet(oldValue, newValue);

It seems that unboxed.AddressArray does not have an option of CAS.
A normal CAS is implemented only for objects: i.e. Magic.attemptAddress(object, offset, oldValue, newValue);
However, I don't know how to convert the AddressArray to an object.

Is there a way to use CAS on a specific array element?

Thanks,
Nachshon Cohen
Technion Institute of Technology, Israel



------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.