crosvm/win_util
Daniel Verkamp 7806484161 win_util: move SYSTEM_INFO helpers to base
These helper functions for getting system information are only used to
implement the equivalent base functions, so move the implementation into
base itself.

This also cleans up the initialization of the cached system information
so that it is contained in a single once_cell::sync::Lazy. The relevant
data is retrieved once and stored in an internal struct SystemInfo to
avoid problems with storing SYSTEM_INFO itself (the Win32 structure
contains pointers, so it is not Sync and can't be stored directly in a
sync::Lazy).

BUG=b:263815124
TEST=tools/run_tests --platform=mingw64

Change-Id: I94d029ef165764f976fd34d846fab60b8754cfb1
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4126566
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2023-05-17 19:25:32 +00:00
..
src win_util: move SYSTEM_INFO helpers to base 2023-05-17 19:25:32 +00:00
Cargo.toml win_util: upgrade to windows 0.39.0. 2023-04-11 21:56:19 +00:00