RFR: 8372247: OSX: Semaphore.trywait requires os::Bsd::clock_init

David Holmes dholmes at openjdk.org
Thu Nov 20 11:46:16 UTC 2025


On Thu, 20 Nov 2025 09:25:55 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__`.

Seems fine to do this in the test.

I had no idea that internal "problem list" existed. Pity the associated bug reports are not listed with them.

Thanks

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28417#pullrequestreview-3487374365


More information about the hotspot-runtime-dev mailing list