Home
last modified time | relevance | path

Searched refs:parent (Results 1 – 25 of 54) sorted by relevance

123

/DragonOS/kernel/crates/rbpf/src/
H A Dlib.rs595 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 Ddir.rs59 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 Dfile.rs117 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 Dsymlink.rs52 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 Drbtree.rs38 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 Dinit.rs34 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 Ddevice_node.rs30 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 Di8042_ports.rs112 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 Di8042_driver.rs38 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 Di8042_device.rs116 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/namespaces/
H A Dpid_namespace.rs37 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/pci/
H A Ddevice.rs107 pub fn new(parent: Option<Weak<dyn KObject>>) -> Arc<Self> { in new()
116 bus_device.set_parent(parent); in new()
136 fn parent(&self) -> Option<alloc::sync::Weak<dyn KObject>> { in parent() method
137 self.inner().kobject_common.parent.clone() in parent()
186 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent()
187 self.inner().kobject_common.parent = parent; in set_parent()
241 self.inner().device_common.parent = dev_parent; in set_dev_parent()
H A Draw_device.rs167 self.inner.write().device_common.parent.clone() in dev_parent()
171 self.inner.write().device_common.parent = dev_parent; in set_dev_parent()
188 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method
189 self.inner.read().kobject_common.parent.clone() in parent()
192 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent()
193 self.inner.write().kobject_common.parent = parent; in set_parent()
/DragonOS/kernel/src/driver/base/
H A Dkset.rs162 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 Dcpu.rs192 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 Dmod.rs81 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 Dpt_device.rs161 self.device_data.read().parent.clone() in dev_parent()
165 self.device_data.write().parent = dev_parent in set_dev_parent()
182 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method
183 self.kobj_data.read().parent.clone() in parent()
186 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent()
187 self.kobj_data.write().parent = parent; in set_parent()
H A Dpt_driver.rs128 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 Dplatform_device.rs141 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 Dvirtio_net.rs147 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()
733 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method
734 self.inner().kobj_common.parent.clone() in parent()
[all …]
/DragonOS/kernel/src/driver/block/
H A Dvirtio_blk.rs414 fn set_dev_parent(&self, parent: Option<Weak<dyn Device>>) { in set_dev_parent()
415 self.inner().device_common.parent = parent; in set_dev_parent()
432 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method
433 self.inner().kobject_common.parent.clone() in parent()
436 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent()
437 self.inner().kobject_common.parent = parent; in set_parent()
619 fn parent(&self) -> Option<Weak<dyn KObject>> { in parent() method
620 self.inner().kobj_common.parent.clone() in parent()
623 fn set_parent(&self, parent: Option<Weak<dyn KObject>>) { in set_parent()
624 self.inner().kobj_common.parent = parent; in set_parent()
/DragonOS/kernel/src/driver/input/ps2_mouse/
H A Dps_mouse_driver.rs88 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 Drtc.rs171 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 Dmod.rs295 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 Dsysfs.rs183 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()

123