RFR: 8261027: AArch64: Support for LSE atomics C++ HotSpot code [v2]

Andrew Haley aph at openjdk.java.net
Mon Feb 8 18:50:10 UTC 2021


On Mon, 8 Feb 2021 12:06:51 GMT, Andrew Dinn <adinn at openjdk.org> wrote:

>> Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Review changes
>
> src/hotspot/os_cpu/linux_aarch64/atomic_linux_aarch64.hpp line 88:
> 
>> 86:   template<typename D, typename I>
>> 87:   D add_and_fetch(D volatile* dest, I add_value, atomic_memory_order order) const {
>> 88:     D old_value = fetch_and_add(dest, add_value, order) + add_value;
> 
> I'm not sure this should be called old_value. It is actually old_value + add_value i.e. it really ought to be called eiter new_value (or just value?).

Sure. This templated code is copied from os_cpu/linux_x86, so I kept the names the same as in that file. But you're right, that would make more sense.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2434


More information about the hotspot-dev mailing list