On Tue, 30 Mar 2021 13:38:59 GMT, Richard Reingruber <[email protected]> wrote:
>> src/hotspot/share/runtime/handshake.cpp line 617:
>>
>>> 615: {
>>> 616: MutexLocker ml(&_lock, Mutex::_no_safepoint_check_flag);
>>> 617: if (!is_suspend_requested()) {
>>
>> The current thread is _thread_in_vm. Can it be suspended then? For a suspend
>> it has to be in a safe thread state which it cannot leave while suspended.
>> So it must have reached _thread_in_vm not suspended and it cannot be
>> suspended while in that state.
>
> Shouldn't `is_suspend_requested()` be replaced with `is_suspended()`? See
> also comment on declaration of `_suspend_requested`.
Your are right. Doing a different version. Need some testing.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3191