On Tue, 5 May 2026 07:34:28 GMT, David Holmes <[email protected]> wrote:
>> Since the suspender can read this concurrently I think we should use atomic >> store when writing per the style guide. > > Yes you are right. Thanks I note that `_jni_active_critical` does not use `Atomic::store`. Also note we are piggy-backing on the state changes to the thread - if we see that the thread is handshake-safe then we must be guaranteed to see any update to the count that happened whilst the thread was handshake-unsafe. If we look at the count prior to that (claim_handshake) then we may see zero incorrectly but if we get passed `can_process_handshake` then we know examination of the count in `get_op` must return the correct value. But yes I can still use `Atomic::store` per the style guide. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30936#discussion_r3199501935
