RFR: 8257831: Suspend with handshakes [v4]

Robbin Ehn rehn at openjdk.java.net
Tue Apr 13 07:36:21 UTC 2021


On Tue, 13 Apr 2021 02:46:46 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> 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().

Fixed

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

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


More information about the serviceability-dev mailing list