RFR (XXS) 8037295: Add size_t versions of Atomic::add, dec, and inc

David Holmes david.holmes at oracle.com
Wed Mar 26 09:23:06 UTC 2014

Hi David,

On 26/03/2014 6:51 PM, David Simms wrote:
> Gidday,
> Some folks have requested size_t type variants of Atomic add, dec and
> inc; to save on messy looking casts or using an inappropriate type.
> Bug/Enhancement: https://bugs.openjdk.java.net/browse/JDK-8037295
> Webrev: http://cr.openjdk.java.net/~dsimms/8037295/
> <http://cr.openjdk.java.net/%7Edsimms/8037295/>
> Have searched for existing cases, most looked like a potential change in
> type size or requiring const (still needs cast), except for
> heapRegionRemSet.hpp where size_t was clearly the intended type.
> Testing: hotspot jtreg tests and "quick test list".

This looks okay to me. Is there any reason not to provide xchg and 
cmpxchg size_t variants too?

David H.

> Cheers
> /David Simms

More information about the hotspot-runtime-dev mailing list