/DragonOS/kernel/crates/rbpf/src/ |
H A D | lib.rs | 595 parent: EbpfVmMbuff<'a>, field 624 let parent = EbpfVmMbuff::new(prog)?; in new() localVariable 632 Ok(EbpfVmFixedMbuff { parent, mbuff }) in new() 678 self.parent.set_program(prog)?; in set_program() 713 self.parent.set_verifier(verifier) in set_verifier() 765 self.parent.register_helper(key, function) in register_helper() 813 self.parent.execute_program(mem, &self.mbuff.buffer) in execute_program() 841 let prog = match self.parent.prog { in jit_compile() 848 self.parent.jit = Some(jit::JitMemory::new(prog, &self.parent.helpers, true, true)?); in jit_compile() 911 match &self.parent.jit { in execute_program_jit() [all …]
|
/DragonOS/kernel/src/filesystem/sysfs/ |
H A D | dir.rs | 59 let parent = kobj in create_dir() localVariable 60 .parent() in create_dir() 67 let dir: Arc<KernFSInode> = parent.add_dir( in create_dir() 89 pub(super) fn kernfs_path(&self, parent: &Arc<KernFSInode>) -> String { in kernfs_path() 90 let mut p = parent.clone(); in kernfs_path() 96 if let Some(parent) = p.parent() { in kernfs_path() 97 p = parent; in kernfs_path() 123 let parent = inode.parent().unwrap(); in remove_dir() localVariable 124 parent.remove_recursive() in remove_dir()
|
H A D | file.rs | 117 parent: &Arc<KernFSInode>, in add_file_with_mode() 121 let x = parent.private_data_mut(); in add_file_with_mode() 127 let path = self.kernfs_path(parent); in add_file_with_mode() 155 let r = parent.add_file( in add_file_with_mode() 165 self.warn_duplicate(parent, attr.name()); in add_file_with_mode() 182 let parent = kobj.inode(); in remove_file() localVariable 184 if let Some(parent) = parent { in remove_file() 185 let r = parent.remove(attr.name()); in remove_file() 218 let parent = kobj.inode(); in remove_bin_file() localVariable 220 if let Some(parent) = parent { in remove_bin_file() [all …]
|
H A D | symlink.rs | 52 let parent = if let Some(kobj) = kobj { in do_create_link() localVariable 59 let parent = parent.ok_or(SystemError::EFAULT)?; in do_create_link() localVariable 60 return self.do_create_link_sd(&parent, target, name, warn); in do_create_link()
|
/DragonOS/kernel/src/libs/ |
H A D | rbtree.rs | 38 parent: NodePtr<K, V>, field 98 parent: NodePtr::null(), in new() 151 self.parent().left() == *self in is_left_child() 156 self.parent().right() == *self in is_right_child() 184 if temp.parent().is_null() { in next() 188 return temp.parent(); in next() 190 temp = temp.parent(); in next() 202 if temp.parent().is_null() { in prev() 206 return temp.parent(); in prev() 208 temp = temp.parent(); in prev() [all …]
|
/DragonOS/kernel/src/driver/base/device/ |
H A D | init.rs | 34 let parent = devices_kset.clone() as Arc<dyn KObject>; in devices_init() localVariable 35 virtual_kset.set_parent(Some(Arc::downgrade(&parent))); in devices_init() 57 let parent = dev_kset.clone() as Arc<dyn KObject>; in devices_init() localVariable 58 dev_block_kset.set_parent(Some(Arc::downgrade(&parent))); in devices_init() 72 let parent = dev_kset.clone() as Arc<dyn KObject>; in devices_init() localVariable 73 dev_char_kset.set_parent(Some(Arc::downgrade(&parent))); in devices_init()
|
/DragonOS/kernel/src/driver/open_firmware/ |
H A D | device_node.rs | 30 parent: Weak<DeviceNode>, field 51 parent: Weak::new(), in new() 69 pub fn parent(&self) -> Option<Arc<DeviceNode>> { in parent() method 70 self.inner.lock().parent.upgrade() in parent() 73 pub fn set_parent(&self, parent: Arc<DeviceNode>) { in set_parent() 74 self.inner.lock().parent = Arc::downgrade(&parent); in set_parent() 117 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method
|
/DragonOS/kernel/src/driver/input/serio/i8042/ |
H A D | i8042_ports.rs | 112 fn set_dev_parent(&self, parent: Option<Weak<dyn Device>>) { in set_dev_parent() 113 self.inner().device_common.parent = parent; in set_dev_parent() 130 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 131 self.inner().kobject_common.parent.clone() in parent() 134 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 135 self.inner().kobject_common.parent = parent; in set_parent()
|
H A D | i8042_driver.rs | 38 parent: None, in new() 57 parent: Option<Weak<dyn KObject>>, field 147 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 148 self.inner.lock().parent.clone() in parent() 151 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 152 self.inner.lock().parent = parent; in set_parent()
|
H A D | i8042_device.rs | 116 self.inner().device_common.parent = dev_parent; in set_dev_parent() 133 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 134 self.inner().kobject_common.parent.clone() in parent() 137 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 138 self.inner().kobject_common.parent = parent; in set_parent()
|
/DragonOS/kernel/src/driver/pci/ |
H A D | device.rs | 100 pub fn new(parent: Option<Weak<dyn KObject>>) -> Arc<Self> { in new() 109 bus_device.set_parent(parent); in new() 129 fn parent(&self) -> Option<alloc::sync::Weak<dyn KObject>> { in parent() method 130 self.inner().kobject_common.parent.clone() in parent() 179 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 180 self.inner().kobject_common.parent = parent; in set_parent() 234 self.inner().device_common.parent = dev_parent; in set_dev_parent()
|
H A D | raw_device.rs | 143 self.inner.write().device_common.parent.clone() in dev_parent() 147 self.inner.write().device_common.parent = dev_parent; in set_dev_parent() 164 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 165 self.inner.read().kobject_common.parent.clone() in parent() 168 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 169 self.inner.write().kobject_common.parent = parent; in set_parent()
|
/DragonOS/kernel/src/namespaces/ |
H A D | pid_namespace.rs | 37 parent: Option<Arc<PidNamespace>>, field 124 if let Some(parent_ns) = &pid_ns.parent { in alloc_pid() 175 let mut pid_ns = &PidNamespace::ns_common_to_ns(ns_common).parent; in get_parent() 181 pid_ns = &ns.parent; in get_parent() 200 if let Some(ns) = &pid_ns.parent { in install() 220 parent: None, in new() 231 parent: Arc<PidNamespace>, in create_pid_namespace() 234 let level = parent.level + 1; in create_pid_namespace() 248 let child_reaper = parent.child_reaper.clone(); in create_pid_namespace() 254 parent: Some(parent), in create_pid_namespace()
|
/DragonOS/kernel/src/driver/base/ |
H A D | kset.rs | 162 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 163 self.parent_data.read().parent.clone() in parent() 166 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 167 self.parent_data.write().parent = parent; in set_parent() 209 parent: Option<Weak<dyn KObject>>, field 214 fn new(parent: Option<Weak<dyn KObject>>, kset: Option<Arc<KSet>>) -> Self { in new() 215 Self { parent, kset } in new()
|
H A D | cpu.rs | 192 self.inner.read().device_common.parent.clone() in dev_parent() 196 self.inner.write().device_common.parent = dev_parent; in set_dev_parent() 217 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 218 self.inner.read().kobject_common.parent.clone() in parent() 221 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 222 self.inner.write().kobject_common.parent = parent; in set_parent()
|
/DragonOS/kernel/src/filesystem/kernfs/ |
H A D | mod.rs | 81 root_inode.inner.write().parent = Arc::downgrade(&root_inode); in new() 106 parent: Weak::new(), in create_root_inode() 144 parent: Weak<KernFSInode>, field 241 .parent in find() 389 parent: Option<Arc<KernFSInode>>, in new() 397 let parent: Weak<KernFSInode> = parent.map(|x| Arc::downgrade(&x)).unwrap_or_default(); in new() localVariable 402 parent: parent.clone(), in new() 421 if parent.strong_count() > 0 { in new() 422 let kernfs = parent in new() 613 pub fn parent(&self) -> Option<Arc<KernFSInode>> { in parent() method [all …]
|
/DragonOS/kernel/src/driver/pci/test/ |
H A D | pt_device.rs | 135 self.device_data.read().parent.clone() in dev_parent() 139 self.device_data.write().parent = dev_parent in set_dev_parent() 156 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 157 self.kobj_data.read().parent.clone() in parent() 160 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 161 self.kobj_data.write().parent = parent; in set_parent()
|
H A D | pt_driver.rs | 128 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 129 self.kobj_data.read().parent.clone() in parent() 132 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 133 self.kobj_data.write().parent = parent; in set_parent()
|
/DragonOS/kernel/src/driver/base/platform/ |
H A D | platform_device.rs | 141 parent: Option<Weak<dyn KObject>>, in new() 147 platform_bus_device.set_parent(parent); in new() 222 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 223 self.inner().kobject_common.parent.clone() in parent() 270 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 271 self.inner().kobject_common.parent = parent; in set_parent() 330 self.inner().device_common.parent = dev_parent; in set_dev_parent()
|
/DragonOS/kernel/src/driver/net/ |
H A D | virtio_net.rs | 147 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 148 self.inner().kobj_common.parent.clone() in parent() 151 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 152 self.inner().kobj_common.parent = parent; in set_parent() 255 fn set_dev_parent(&self, parent: Option<Weak<dyn Device>>) { in set_dev_parent() 256 self.inner().device_common.parent = parent; in set_dev_parent() 508 fn set_dev_parent(&self, parent: Option<Weak<dyn Device>>) { in set_dev_parent() 509 self.inner().device_common.parent = parent; in set_dev_parent() 727 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 728 self.inner().kobj_common.parent.clone() in parent() [all …]
|
/DragonOS/kernel/src/driver/block/ |
H A D | virtio_blk.rs | 413 fn set_dev_parent(&self, parent: Option<Weak<dyn Device>>) { in set_dev_parent() 414 self.inner().device_common.parent = parent; in set_dev_parent() 431 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 432 self.inner().kobject_common.parent.clone() in parent() 435 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 436 self.inner().kobject_common.parent = parent; in set_parent() 618 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 619 self.inner().kobj_common.parent.clone() in parent() 622 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 623 self.inner().kobj_common.parent = parent; in set_parent()
|
/DragonOS/kernel/src/driver/input/ps2_mouse/ |
H A D | ps_mouse_driver.rs | 88 parent: None, in new() 119 parent: Option<Weak<dyn KObject>>, field 172 fn parent(&self) -> Option<alloc::sync::Weak<dyn KObject>> { in parent() method 173 self.inner.lock().parent.clone() in parent() 176 fn set_parent(&self, parent: Option<alloc::sync::Weak<dyn KObject>>) { in set_parent() 177 self.inner.lock().parent = parent; in set_parent()
|
/DragonOS/kernel/src/arch/x86_64/driver/ |
H A D | rtc.rs | 171 fn set_dev_parent(&self, parent: Option<Weak<dyn Device>>) { in set_dev_parent() 172 self.inner().device_common.parent = parent; in set_dev_parent() 189 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 193 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 194 self.inner().kobject_common.parent = parent; in set_parent()
|
/DragonOS/kernel/src/driver/serial/serial8250/ |
H A D | mod.rs | 295 self.inner.read().device_common.parent.clone() in dev_parent() 299 self.inner.write().device_common.parent = dev_parent; in set_dev_parent() 316 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 317 self.inner.read().kobject_common.parent.clone() in parent() 320 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 321 self.inner.write().kobject_common.parent = parent; in set_parent() 515 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 519 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 520 self.inner.write().parent_kobj = parent; in set_parent()
|
/DragonOS/kernel/src/driver/rtc/ |
H A D | sysfs.rs | 183 self.inner().device_common.parent = dev_parent; in set_dev_parent() 200 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method 201 self.inner().kobject_common.parent.clone() in parent() 204 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent() 205 self.inner().kobject_common.parent = parent; in set_parent() 306 .parent() in show()
|