Lines Matching refs:Arc

3     sync::{Arc, Weak},
38 static mut VIRTIO_BUS: Option<Arc<VirtIOBus>> = None;
41 pub fn virtio_bus() -> Arc<VirtIOBus> { in virtio_bus()
51 pub fn new() -> Arc<Self> { in new()
54 let bus = Arc::new(Self { private }); in new()
56 .set_bus(Some(Arc::downgrade(&(bus.clone() as Arc<dyn Bus>)))); in new()
80 fn probe(&self, device: &Arc<dyn Device>) -> Result<(), SystemError> { in probe()
101 fn remove(&self, _device: &Arc<dyn Device>) -> Result<(), SystemError> { in remove()
105 fn sync_state(&self, _device: &Arc<dyn Device>) { in sync_state()
109 fn shutdown(&self, _device: &Arc<dyn Device>) { in shutdown()
113 fn resume(&self, _device: &Arc<dyn Device>) -> Result<(), SystemError> { in resume()
120 _device: &Arc<dyn Device>, in match_device()
121 _driver: &Arc<dyn Driver>, in match_device()
172 pub fn register(&self, driver: Arc<dyn VirtIODriver>) -> Result<(), SystemError> { in register()
173 driver.set_bus(Some(Arc::downgrade(&(virtio_bus() as Arc<dyn Bus>)))); in register()
174 return driver_manager().register(driver as Arc<dyn Driver>); in register()
178 pub fn unregister(&self, driver: &Arc<dyn VirtIODriver>) { in unregister()
179 driver_manager().unregister(&(driver.clone() as Arc<dyn Driver>)); in unregister()
191 pub fn device_add(&self, dev: Arc<dyn VirtIODevice>) -> Result<(), SystemError> { in device_add()
192 dev.set_bus(Some(Arc::downgrade(&(virtio_bus() as Arc<dyn Bus>)))); in device_add()
193 device_manager().device_default_initialize(&(dev.clone() as Arc<dyn Device>)); in device_add()
199 device_manager().add_device(dev.clone() as Arc<dyn Device>)?; in device_add()
201 .add_groups(&(dev.clone() as Arc<dyn Device>), &[&VirtIODeviceAttrGroup]); in device_add()
211 fn setup_irq(&self, dev: &Arc<dyn VirtIODevice>) -> Result<(), SystemError> { in setup_irq()
244 pub fn device_remove(&self, dev: &Arc<dyn VirtIODevice>) -> Result<(), SystemError> { in device_remove()
245 device_manager().remove(&(dev.clone() as Arc<dyn Device>)); in device_remove()
321 fn show(&self, kobj: Arc<dyn KObject>, buf: &mut [u8]) -> Result<usize, SystemError> { in show()
348 fn show(&self, kobj: Arc<dyn KObject>, buf: &mut [u8]) -> Result<usize, SystemError> { in show()