On Wed, 2 Dec 2026 02:38:04 GMT, Serguei Spitsyn <[email protected]> wrote:
>> Fredrik Bredberg has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Updated comments for Daniel and Serguei
>
> src/hotspot/os/posix/os_posix.cpp line 1862:
>
>> 1860: assert_status(status == 0, status, "mutex_unlock");
>> 1861:
>> 1862: // Note that we signal() *after* dropping the lock for "immortal"
>> Events.
>
> Q: Just wanted to double-ckeck if this comment saying about `"immortal"
> Events` need to be updated.
> It looks like your changes impacted this part.
Updated comment.
> src/hotspot/share/runtime/objectMonitor.cpp line 1528:
>
>> 1526: // 4. ST _owner = nullptr
>> 1527: // 5. unpark(wakee)
>> 1528: // 6. drop usage of wakee's park event
>
> Q: Does the `Exit protocol` described above have differences for platform and
> virtual threads?
> The virtual thread case uses the shared immortal unparker events.
Updated comment.
> src/hotspot/share/runtime/objectMonitor.cpp line 1543:
>
>> 1541: vthread = Wakee->vthread();
>> 1542: assert(vthread != nullptr, "");
>> 1543: // The vthread park event is immortal, so no need to retain its
>> usage.
>
> Q: Should the comment also say "is shared immortal"?
Updated comment.
> src/hotspot/share/runtime/park.hpp line 115:
>
>> 113: // unpark operation. Using a ThreadsListHandle (TLH) is another. But,
>> since a
>> 114: // TLH can not protect a non-Java thread waiting on a raw monitor, we
>> don't
>> 115: // use TLH, only usage counting.
>
> Q: Does the comment above needs a correction related to the interrupt path as
> `JavaThread::interrupt()` still depends on a `ThreadsListHandle`?
>
> There is a comment at the beginning of `JavaThread::interrupt()`:
>
> void JavaThread::interrupt() {
> // All callers should have 'this' thread protected by a
> // ThreadsListHandle so that it cannot terminate and deallocate
> // itself.
Updated comment.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/33770#discussion_r4770034724
PR Review Comment: https://git.openjdk.org/jdk/pull/33770#discussion_r4770043096
PR Review Comment: https://git.openjdk.org/jdk/pull/33770#discussion_r4770046185
PR Review Comment: https://git.openjdk.org/jdk/pull/33770#discussion_r4770039671