RFR: 8257831: Suspend with handshakes [v4]

David Holmes dholmes at openjdk.java.net
Tue Apr 13 02:50:18 UTC 2021


On Fri, 9 Apr 2021 15:45:50 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

>> Robbin Ehn has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits:
>> 
>>  - White space fixes
>>  - Merge branch 'master' into SuspendInHandshake
>>  - Review fixes
>>  - Merge branch 'master' into SuspendInHandshake
>>  - Merge branch 'master' into SuspendInHandshake
>>  - 8257831: Suspend with handshake (review baseline)
>
> src/hotspot/share/runtime/thread.cpp line 455:
> 
>> 453:   ParkEvent::Release(_ParkEvent);
>> 454:   // Can be racingly loaded in signal handler via has_terminated()
>> 455:   Atomic::store(&_ParkEvent, (ParkEvent*)NULL);
> 
> Nice solution for that odd signal handler issue.

Yes nice simple fix, but note that the comments at lines 451 and 452 are wrong - we can't ever encounter a null _ParkEvent, and we are not nulling for good hygiene any more. I suggest the comment at line 454 be changed to read:
// Set to NULL as a termination indicator for has_terminated().

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

PR: https://git.openjdk.java.net/jdk/pull/3191


More information about the serviceability-dev mailing list