crosvm/base
Daniel Verkamp 3002df7872 base: windows: make Event wait() actually infinite
Refactor the Windows PlatformEvent wait and wait_timeout functions to
use an internal wrapper function that correctly handles waiting forever
by passing the INFINITE value to WaitForSingleObject.

Previously, the wait function used a Duration value of i64::MAX seconds,
which becomes 0xfffffc18 when converted to milliseconds and truncated to
a DWORD. This does not correspond to the INFINITE value (-1, 0xffffffff)
that the Win32 Wait* functions expect, so theoretically a wait() call
could have returned without the event being signaled.

BUG=b:231344063
TEST=tools/presubmit --all

Change-Id: If68c4b2518926c12e8caf6746ef4b0bb152be00d
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3966485
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Noah Gold <nkgold@google.com>
2022-11-01 21:03:05 +00:00
..
base_event_token_derive Update all copyright headers to match new style 2022-09-13 18:41:29 +00:00
src base: windows: make Event wait() actually infinite 2022-11-01 21:03:05 +00:00
tests Reformat all files with nightly 2022-10-31 21:33:33 +00:00
.build_test_serial
Cargo.toml