On Fri, 1 May 2026 07:10:25 GMT, David Holmes <[email protected]> wrote:

>> src/hotspot/share/runtime/javaThread.hpp line 980:
>> 
>>> 978:   void exit_jni_deferred_suspension() {
>>> 979:     assert(Thread::current() == this, "this must be current thread");
>>> 980:     _jni_deferred_suspension_count--;
>> 
>> Why 
>> `AtomicAccess::inc(&_jni_deferred_suspension_count);`
>> is not used here? (Same for dec())
>> I am not sure I see how this access is protected.
>
> Because only the current thread modifies its own count.

Since the suspender can read this concurrently I think we should use atomic 
store when writing per the style guide.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30936#discussion_r3183943257

Reply via email to