RFR: 8372247: OSX: Semaphore.trywait requires os::Bsd::clock_init
Axel Boldt-Christmas
aboldtch at openjdk.org
Thu Nov 20 09:32:11 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__`.
-------------
Depends on: https://git.openjdk.org/jdk/pull/28409
Commit messages:
- 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=00
Issue: https://bugs.openjdk.org/browse/JDK-8372247
Stats: 9 lines in 2 files changed: 8 ins; 1 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