mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
pci, devices, virtio-devices, vmm: Refactor allocate_bars
Refactor PciDevice::allocate_bars trait and all implementations to take &mut SystemAllocator instead of &Arc<Mutex<SystemAllocator>>, removing double indirection. The caller in device_manager.rs now acquires the lock before calling allocate_bars. Signed-off-by: Chinmoy <daschinmoyy21@gmail.com>
This commit is contained in:
@@ -3995,7 +3995,7 @@ impl DeviceManager {
|
||||
.lock()
|
||||
.unwrap()
|
||||
.allocate_bars(
|
||||
&self.address_manager.allocator,
|
||||
&mut self.address_manager.allocator.lock().unwrap(),
|
||||
&mut self.pci_segments[segment_id as usize]
|
||||
.mem32_allocator
|
||||
.lock()
|
||||
|
||||
Reference in New Issue
Block a user