mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-09 03:57:24 +00:00
devices: virtio: vsock: Use async event without reset
When receiving guest data, we wait on an event after writing them out to the named pipe so that we know that the write has completed. This resets the event. Then we call `GetOverlappedResult` with `bWait` set. While this does behave correctly because `GetOverlappedResult` checks the internal status of the request before waiting, there's no need to have the event get reset here. BUG: b:255635953 TEST: Built and ran crosvm downstream. Change-Id: Ic031821dda1e7ae696dfafa812afa4c0b6cff0ec Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4062049 Reviewed-by: Noah Gold <nkgold@google.com> Commit-Queue: Richard Otap <rotap@google.com>
This commit is contained in:
parent
616e84ae54
commit
2594731840
1 changed files with 1 additions and 1 deletions
|
@ -745,7 +745,7 @@ impl Worker {
|
|||
// always be negligible, but will sometimes be non-zero in cases where
|
||||
// traffic is high on the NamedPipe, especially a duplex pipe.
|
||||
if let Ok(cloned_event) = write_completed_event.try_clone() {
|
||||
if let Ok(async_event) = EventAsync::new(cloned_event, ex) {
|
||||
if let Ok(async_event) = EventAsync::new_without_reset(cloned_event, ex) {
|
||||
let _ = async_event.next_val().await;
|
||||
} else {
|
||||
error!(
|
||||
|
|
Loading…
Reference in a new issue