RFR (L, but tedious) 8188220: Remove Atomic::*_ptr() uses and overloads from hotspot

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Tue Oct 10 22:01:01 UTC 2017

Summary: With the new template functions these are unnecessary.

The changes are mostly s/_ptr// and removing the cast to return type.  
There weren't many types that needed to be improved to match the 
template version of the function.   Some notes:
1. replaced CASPTR with Atomic::cmpxchg() in mutex.cpp, rearranging 
2. renamed Atomic::replace_if_null to Atomic::cmpxchg_if_null.  I 
disliked the first name because it's not explicit from the callers that 
there's an underlying cas.  If people want to fight, I'll remove the 
function and use cmpxchg because there are only a couple places where 
this is a little nicer.
3. Added Atomic::sub()

Tested with JPRT, mach5 tier1-5 on linux,windows and solaris.

open webrev at http://cr.openjdk.java.net/~coleenp/8188220.01/webrev
bug link https://bugs.openjdk.java.net/browse/JDK-8188220


More information about the hotspot-dev mailing list