RFR: 8367014: Rename class Atomic to AtomicAccess
Stefan Karlsson
stefank at openjdk.org
Tue Sep 9 11:52:03 UTC 2025
On Mon, 8 Sep 2025 06:26:03 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this change that renames the all-static class `Atomic` to
> `AtomicAccess`. The reason for this name change is to allow the introduction
> of the new type `Atomic<T>` ([JDK-8367013](https://bugs.openjdk.org/browse/JDK-8367013)).
>
> The PR has several commits, according to the specific category of change being
> made. It may be easier to review the PR by studying these individual commits.
>
> Although the file "atomic.hpp" is being renamed to "atomicAccess.hpp", I chose
> to not rename the various "atomic_<cpu>.*" and "atomic_<os>_<cpu>.*" files.
>
> There are a number of comments containing the word "Atomic" that I didn't
> change. They are generically about atomic operations, and will just as well
> serve as referring to the future `Atomic<T>`.
>
> Testing: mach5 tier1, GHA sanity tests.
> This is one of those changes where successful builds indicate the change is good.
I've checked through the patch and it looks good. I found one file that lacked alignment adjustments.
> Although the file "atomic.hpp" is being renamed to "atomicAccess.hpp", I chose
> to not rename the various "atomic_." and "atomic__." files.
Could you motivate why you chose to not do that?
src/hotspot/os_cpu/bsd_x86/atomic_bsd_x86.hpp line 43:
> 41: template<>
> 42: template<typename D, typename I>
> 43: inline D AtomicAccess::PlatformAdd<4>::fetch_then_add(D volatile* dest, I add_value,
This file has multiple alignment issues.
-------------
Marked as reviewed by stefank (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/27135#pullrequestreview-3200998425
PR Review Comment: https://git.openjdk.org/jdk/pull/27135#discussion_r2333148324
More information about the hotspot-dev
mailing list