mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-25 05:03:05 +00:00
a52b2a6c81
A plugin might care to be immediately notified when a write is made to a port, but it doesn't care to have the VM stopped while the plugin calls back to resume the VM. Unfortunately this means that multiple messages can be queued up in the pipe and read() together by the plugin API. Protobuf's parsing function doesn't report how many bytes it read, so I've resorted to having crosvm prefix every message with a length and then have the plugin lib parse this number. Impact on performance has not been measured. BUG=b:143294496 TEST=Local build and run of build_test. Verified that new unit test was executed, exercised the case where multiple msgs are received together, and completed successfully. Change-Id: If6ef463e7b4d2e688e649f832a764fa644bf2d36 Signed-off-by: Matt Delco <delco@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1896376 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Stephen Barber <smbarber@chromium.org> |
||
---|---|---|
.. | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml |