RFR: 8367013: Add Atomic<T> to package/replace idiom of volatile var plus AtomicAccess:: operations [v3]
David Holmes
dholmes at openjdk.org
Thu Oct 16 07:09:04 UTC 2025
On Thu, 16 Oct 2025 05:50:57 GMT, Quan Anh Mai <qamai 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.
No we are not inventing something new - this already exists for a long time in Hotspot. Please see orderAccess.hpp
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27539#issuecomment-3409472645
More information about the hotspot-dev
mailing list