RFR: 8372247: OSX: Semaphore.trywait requires os::Bsd::clock_init [v2]
Axel Boldt-Christmas
aboldtch at openjdk.org
Thu Nov 20 13:17:37 UTC 2025
> The OSX implementation of the Semaphore requires `os::javaTimeNanos` which requires that we have initiated the clocks via `os::Bsd::clock_init()`. Or we will get an integer division by zero when performing a trywait.
>
> I propose that we let this test setup `os::Bsd::clock_init()` rather than being forced to run in VM.
>
> An alternative would be to simply run this test in VM. Making the dependency more clear. Or only use VM for `__APPLE__`.
Axel Boldt-Christmas has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits:
- Merge branch 'JDK-8372241' into JDK-8372247
- OSX: Semaphore.trywait requires os::Bsd::clock_init
-------------
Changes: https://git.openjdk.org/jdk/pull/28417/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28417&range=01
Stats: 10 lines in 2 files changed: 8 ins; 2 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/28417.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28417/head:pull/28417
PR: https://git.openjdk.org/jdk/pull/28417
More information about the hotspot-runtime-dev
mailing list