Atomic::cmpxchg_ptr code duplication
Christian Thalinger
Christian.Thalinger at Sun.COM
Thu Apr 2 05:52:38 PDT 2009
On Thu, 2009-04-02 at 08:23 +0200, Christian Thalinger wrote:
> > However, both the intptr_t and void* variants have bodies defined in
> > each of the various platform-specific headers (e.g.,
> > atomic_windows_x86.inline.hpp, atomic_solaris_x86.inline.hpp, ...).
> > So there are 10 places where the cmpxchg_ptr(void*...) variant is
> > defined, instead of one. Is there a reason for the duplication?
>
> I don't see a reason for the duplication. Maybe it's another historic
> artifact?
I prepared a patch which removes the unnecessary cmpxchg_ptr and
xchg_ptr functions:
http://cr.openjdk.java.net/~twisti/cmpxchg_ptr/webrev.00/
A JPRT run with that changes was successful.
-- Christian
More information about the hotspot-dev
mailing list