mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-devices: Upon reset reap/join the device threads
We have killed the device thread by writing to the exit EventFd but we should wait for them to quit to ensure consistency. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
ef363d79fb
commit
22649c4a87
@@ -299,6 +299,14 @@ impl VirtioCommon {
|
|||||||
let _ = kill_evt.write(1);
|
let _ = kill_evt.write(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let Some(mut threads) = self.epoll_threads.take() {
|
||||||
|
for t in threads.drain(..) {
|
||||||
|
if let Err(e) = t.join() {
|
||||||
|
error!("Error joining thread: {:?}", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Return the interrupt and queue EventFDs
|
// Return the interrupt and queue EventFDs
|
||||||
Some((
|
Some((
|
||||||
self.interrupt_cb.take().unwrap(),
|
self.interrupt_cb.take().unwrap(),
|
||||||
|
|||||||
Reference in New Issue
Block a user