RFR: JDK-8285362: unify os::pause platform coding

David Holmes dholmes at openjdk.java.net
Thu Apr 21 13:04:38 UTC 2022


On Thu, 21 Apr 2022 12:30:34 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> The os::pause() coding in the different os_platform.cpp files is very close, so it should be unified at os.cpp .
> Small differences : Windows uses Sleep, the other platforms use poll.
> AIX used trcVerbose for some error/warning - like  output, the other platforms used jio_fprintf ; I think it makes sense to unify this on all OS to jio_fprintf .

This seems reasonable though I like to avoid ifdefs in the shared os code - but on the flip side we also like to avoid duplication. An alternative would be to keep the os_windows.cpp version and define a shared os_posix.cpp version instead ... but I guess I can live with this version.

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

Marked as reviewed by dholmes (Reviewer).

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


More information about the hotspot-runtime-dev mailing list