RFR: 8372247: OSX: Semaphore.trywait requires os::Bsd::clock_init [v2]
David Holmes
dholmes at openjdk.org
Fri Nov 21 02:37:01 UTC 2025
On Thu, 20 Nov 2025 13:17:37 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:
>> 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
Marked as reviewed by dholmes (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/28417#pullrequestreview-3490924946
More information about the hotspot-runtime-dev
mailing list