RFR: 8367013: Add Atomic<T> to package/replace idiom of volatile var plus AtomicAccess:: operations
Kim Barrett
kbarrett at openjdk.org
Fri Oct 3 15:25:48 UTC 2025
On Fri, 3 Oct 2025 13:00:30 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> I skimmed through the current code base and can see lots of places that assumes `release` precedes `store`, but I don't get why it has to be this way. Why `store_release` doesn't work? (It matches `load_acquire` in a symmetry, IMO.)
The naming is intentional, to map onto the behavior.
release_store() is roughly like release(); store();
release_store_fence() is roughly like release(); store(); fence()
load_acquire() is roughly like load(); acquire();
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27539#issuecomment-3366171793
More information about the hotspot-dev
mailing list