RFR: 8367013: Add Atomic<T> to package/replace idiom of volatile var plus AtomicAccess:: operations [v3]

Quan Anh Mai qamai at openjdk.org
Thu Oct 16 05:54:03 UTC 2025


On Sat, 4 Oct 2025 01:07:23 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> release_store() is roughly like release(); store();

This would not be a good reason. A release store is not a release fence followed by a store, it only implies a happen-before relationship between itself and the acquire load that observes it. This means that a release store will act as if it is a plain store if the memory is not shared. Another way to look at it is that we invent the term "release_store" which is a release fence followed by a store, this is also not ideal because we are inventing a new definition of an existing term that is different from the existing definition in a subtle way.

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

PR Comment: https://git.openjdk.org/jdk/pull/27539#issuecomment-3409276449


More information about the hotspot-dev mailing list