/DragonOS/kernel/src/driver/base/ |
H A D | subsys.rs | 41 devices: RwLock<Vec<Arc<dyn Device>>>, field 79 devices: RwLock::new(Vec::new()), in new() 120 pub fn devices(&self) -> RwLockReadGuard<Vec<Arc<dyn Device>>> { in devices() method 121 return self.devices.read(); in devices() 185 let mut devices = self.devices.write(); in add_device_to_vec() localVariable 186 if devices.iter().any(|d| Arc::ptr_eq(d, device)) { in add_device_to_vec() 189 devices.push(device.clone()); in add_device_to_vec() 195 let mut devices = self.devices.write(); in remove_device_from_vec() localVariable 196 let index = devices.iter().position(|d| Arc::ptr_eq(d, device)); in remove_device_from_vec() 198 devices.remove(index); in remove_device_from_vec()
|
H A D | class.rs | 86 let guard = subsys.devices(); in find_device()
|
/DragonOS/kernel/src/driver/input/serio/i8042/ |
H A D | i8042_driver.rs | 40 devices: Vec::new(), in new() 59 devices: Vec<Arc<dyn Device>>, field 106 fn devices(&self) -> Vec<Arc<dyn Device>> { in devices() method 107 self.inner.lock().devices.clone() in devices() 113 if guard.devices.iter().any(|dev| Arc::ptr_eq(dev, &device)) { in add_device() 117 guard.devices.push(device); in add_device() 122 guard.devices.retain(|dev| !Arc::ptr_eq(dev, device)); in delete_device()
|
/DragonOS/kernel/src/driver/input/ps2_mouse/ |
H A D | ps_mouse_driver.rs | 90 devices: Vec::new(), in new() 104 if guard.devices.is_empty() { in process_packet() 108 let device: Option<&Ps2MouseDevice> = guard.devices[0] in process_packet() 121 devices: Vec<Arc<dyn Device>>, field 131 fn devices(&self) -> alloc::vec::Vec<Arc<dyn Device>> { in devices() method 132 self.inner.lock().devices.clone() in devices() 138 if guard.devices.iter().any(|dev| Arc::ptr_eq(dev, &device)) { in add_device() 142 guard.devices.push(device); in add_device() 147 guard.devices.retain(|dev| !Arc::ptr_eq(dev, device)); in delete_device()
|
/DragonOS/docs/kernel/filesystem/ |
H A D | sysfs.md | 38 devices: BTreeMap<IdTable, Arc<dyn Device>>, // 所有设备 81 …管理器中均存在sys_info,设备模型通过该成员与sysfs建立联系,sys_info指向sysfs中唯一的inode。对于device而言,对应sysfs下的devices文件夹,其他亦是如此。 94 /// @brief: 总线注册,将总线加入全局总线管理器中,并根据id table在sys/bus和sys/devices下生成文件夹 109 …s_register源码可知,该函数不仅在sysfs/bus下生成总线文件夹,同时内部调用device_register,该函数将总线加入设备管理器中,同时在sys/devices下生成设备文件夹。
|
/DragonOS/kernel/src/driver/pci/test/ |
H A D | pt_driver.rs | 87 fn devices(&self) -> Vec<Arc<dyn Device>> { in devices() method 88 self.driver_data.read().devices.clone() in devices() 94 if guard.devices.iter().any(|dev| Arc::ptr_eq(dev, &device)) { in add_device() 98 guard.devices.push(device); in add_device() 103 guard.devices.retain(|dev| !Arc::ptr_eq(dev, device)); in delete_device()
|
/DragonOS/kernel/src/driver/base/device/ |
H A D | driver.rs | 66 fn devices(&self) -> Vec<Arc<dyn Device>>; in devices() method 119 pub devices: Vec<Arc<dyn Device>>, field 125 if !self.devices.iter().any(|d| Arc::ptr_eq(d, &device)) { in push_device() 126 self.devices.push(device); in push_device() 131 self.devices.retain(|d| !Arc::ptr_eq(d, device)); in delete_device() 164 self.devices() in find_device_slow()
|
H A D | bus.rs | 193 let guard = subsys.devices(); in find_device() 443 for dev in bus.subsystem().devices().iter() { in rescan_devices()
|
H A D | dd.rs | 293 for dev in bus.subsystem().devices().iter() { in driver_attach()
|
/DragonOS/kernel/src/driver/base/platform/ |
H A D | mod.rs | 65 pub fn add_device(&mut self, devices: Vec<&'static str>) { in add_device() 66 for str in devices { in add_device()
|
/DragonOS/kernel/src/driver/serial/serial8250/ |
H A D | mod.rs | 392 devices: Vec<Arc<dyn Device>>, field 403 devices: Vec::new(), in new() 479 fn devices(&self) -> Vec<Arc<dyn Device>> { in devices() method 480 self.inner.read().devices.clone() in devices() 484 self.inner.write().devices.push(device); in add_device() 490 inner.devices.retain(|d| !Arc::ptr_eq(d, device)); in delete_device()
|
/DragonOS/kernel/src/driver/block/ |
H A D | virtio_blk.rs | 63 .devices() in virtio_blk_0() 571 .devices in add_device() 585 .devices in delete_device() 590 guard.driver_common.devices.remove(index); in delete_device() 593 fn devices(&self) -> Vec<Arc<dyn Device>> { in devices() method 594 self.inner().driver_common.devices.clone() in devices()
|
/DragonOS/kernel/src/driver/rtc/ |
H A D | rtc_cmos.rs | 128 fn devices(&self) -> Vec<Arc<dyn Device>> { in devices() method 129 self.inner().driver_common.devices.clone() in devices()
|
/DragonOS/kernel/src/driver/video/fbdev/ |
H A D | vesafb.rs | 707 devices: Vec::new(), in new() 726 devices: Vec<Arc<dyn Device>>, field 773 fn devices(&self) -> Vec<Arc<dyn Device>> { in devices() method 774 self.inner.lock().devices.clone() in devices() 780 if guard.devices.iter().any(|dev| Arc::ptr_eq(dev, &device)) { in add_device() 784 guard.devices.push(device); in add_device() 789 guard.devices.retain(|dev| !Arc::ptr_eq(dev, device)); in delete_device()
|
/DragonOS/kernel/src/driver/net/ |
H A D | virtio_net.rs | 890 .devices in add_device() 904 .devices in delete_device() 909 guard.driver_common.devices.remove(index); in delete_device() 912 fn devices(&self) -> Vec<Arc<dyn Device>> { in devices() method 913 self.inner().driver_common.devices.clone() in devices()
|
/DragonOS/docs/kernel/trace/ |
H A D | eBPF.md | 245 // See /sys/bus/event_source/devices/kprobe/type
|
/DragonOS/kernel/src/driver/tty/ |
H A D | tty_driver.rs | 440 fn devices( in devices() method
|