vhost_user_backend: Allow for one exit_event per thread

By adding the "thread_index" parameter to the function exit_event() from
the VhostUserBackend trait, the backend crate now has the ability to ask
the backend implementation about the exit event related to a specific
thread.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2020-04-09 17:49:11 +02:00
parent b927dceed8
commit cfffb7edb0
4 changed files with 10 additions and 10 deletions

View File

@@ -266,7 +266,7 @@ impl<F: FileSystem + Send + Sync + 'static> VhostUserBackend for VhostUserFsBack
Ok(false)
}
fn exit_event(&self) -> Option<(EventFd, Option<u16>)> {
fn exit_event(&self, _thread_index: usize) -> Option<(EventFd, Option<u16>)> {
Some((
self.thread.lock().unwrap().kill_evt.try_clone().unwrap(),
Some(KILL_EVENT),