RFR: 8304939: os::win32::exit_process_or_thread should be marked noreturn [v3]

Julian Waters jwaters at openjdk.org
Thu Oct 26 04:26:34 UTC 2023


On Thu, 26 Oct 2023 02:58:53 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>> 
>>  - Merge branch 'openjdk:master' into noreturn
>>  - Minor Style Change in os_windows.cpp
>>  - 8304939
>
> src/hotspot/os/posix/os_posix.cpp line 894:
> 
>> 892:   sleep:            // sleep forever ...
>> 893:     ::sleep(100);   // ... 100 seconds at a time
>> 894:   goto sleep;
> 
> I don't recall now why this was written the way it was, but I certainly do not understand why you rewrote it this way with a goto!

ah, when I was searching for functions to implement the noreturn with and stumbled across this one, I thought it could do with a goto instead of a while true since the intent seemed to be clearer. I can revert this if need be

> src/hotspot/os/windows/os_windows.cpp line 4118:
> 
>> 4116: }
>> 4117: 
>> 4118: static void exit_process_or_thread(Ept what, int code) {
> 
> exit_code was clearer and avoids changes below

Noted, will return the name to exit_code

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16303#discussion_r1372564378
PR Review Comment: https://git.openjdk.org/jdk/pull/16303#discussion_r1372564195


More information about the hotspot-dev mailing list