RFR: 8255119: Monitor::wait takes signed integer as timeout
Coleen Phillimore
coleenp at openjdk.org
Mon Jan 9 17:11:52 UTC 2023
On Mon, 9 Jan 2023 07:52:31 GMT, David Holmes <dholmes at openjdk.org> wrote:
> Please review this simple cleanup of the JVM `Monitor`/`PlatformMonitor` code so that timeouts are expressed as unsigned rather than signed values i.e. `int64_t`/`jlong` -> `uint64_t`.
>
> Testing:
> - tiers 1-3
> - all builds in Oracle CI in tiers 1-5, plus shenandoah GC on LInux x64
>
> Thanks
Marked as reviewed by coleenp (Reviewer).
src/hotspot/os/windows/os_windows.cpp line 5363:
> 5361: int PlatformMonitor::wait(uint64_t millis) {
> 5362: int ret = OS_TIMEOUT;
> 5363: if (millis > UINT_MAX) {
Can you add a one line comment saying why this is? is it a platform limitation? or just would be mostly infinite if bigger than UINT_MAX?
-------------
PR: https://git.openjdk.org/jdk/pull/11898
More information about the hotspot-runtime-dev
mailing list