mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: remove unused mutex in api
This patch removes locks in VmCreate request and VmInfo response since we needn't use a lock here and should ensure that internal implementation is transparent to the runtime. Signed-off-by: Songqian Li <sionli@tencent.com>
This commit is contained in:
committed by
Rob Bradford
parent
7eb70730d1
commit
cc9899e09d
@@ -15,7 +15,7 @@ use signal_hook::consts::SIGSYS;
|
||||
use std::fs::File;
|
||||
use std::os::unix::io::{AsRawFd, FromRawFd, RawFd};
|
||||
use std::sync::mpsc::channel;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::sync::Mutex;
|
||||
use std::{env, io};
|
||||
use thiserror::Error;
|
||||
#[cfg(feature = "dbus_api")]
|
||||
@@ -787,7 +787,7 @@ fn start_vmm(cmd_arguments: ArgMatches) -> Result<Option<String>, Error> {
|
||||
.send(
|
||||
api_evt.try_clone().unwrap(),
|
||||
api_request_sender,
|
||||
Arc::new(Mutex::new(vm_config)),
|
||||
Box::new(vm_config),
|
||||
)
|
||||
.map_err(Error::VmCreate)?;
|
||||
vmm::api::VmBoot
|
||||
|
||||
Reference in New Issue
Block a user