mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-10 20:19:07 +00:00
devices: vhost-user: console: make async functions generic
We want to eventually reuse these functions in the regular virtio device code, which uses a different kind of interrupt, so make that parameter generic. BUG=b:228912920 TEST=cargo build Change-Id: I1139ce6626ac7b952b7769db6e66d677607d3307 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3600166 Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
This commit is contained in:
parent
8477c44059
commit
4212e80393
1 changed files with 5 additions and 5 deletions
|
@ -28,12 +28,12 @@ use crate::virtio::vhost::user::device::handler::{
|
|||
DeviceRequestHandler, Doorbell, VhostUserBackend,
|
||||
};
|
||||
use crate::virtio::vhost::user::device::vvu::pci::VvuPciDevice;
|
||||
use crate::virtio::{self, copy_config};
|
||||
use crate::virtio::{self, copy_config, SignalableInterrupt};
|
||||
|
||||
async fn run_tx_queue(
|
||||
async fn run_tx_queue<I: SignalableInterrupt>(
|
||||
mut queue: virtio::Queue,
|
||||
mem: GuestMemory,
|
||||
doorbell: Arc<Mutex<Doorbell>>,
|
||||
doorbell: I,
|
||||
kick_evt: EventAsync,
|
||||
mut output: Box<dyn io::Write>,
|
||||
) {
|
||||
|
@ -46,10 +46,10 @@ async fn run_tx_queue(
|
|||
}
|
||||
}
|
||||
|
||||
async fn run_rx_queue(
|
||||
async fn run_rx_queue<I: SignalableInterrupt>(
|
||||
mut queue: virtio::Queue,
|
||||
mem: GuestMemory,
|
||||
doorbell: Arc<Mutex<Doorbell>>,
|
||||
doorbell: I,
|
||||
kick_evt: EventAsync,
|
||||
in_buffer: Arc<Mutex<VecDeque<u8>>>,
|
||||
in_avail_evt: EventAsync,
|
||||
|
|
Loading…
Reference in a new issue