Home
last modified time | relevance | path

Searched refs:clone (Results 1 – 25 of 50) sorted by relevance

12

/DragonOS-0.1.8/kernel/src/driver/base/platform/
Dmod.rs104 drivers.insert(id_table.clone(), driver.clone()); in register_platform_driver()
133 devices.insert(id_table.clone(), device.clone()); in register_platform_device()
163 match driver.probe(device.clone()) { in driver_match_device()
192 match driver.probe(device.clone()) { in device_match_driver()
244 return self.0.lock().sys_info.clone(); in sys_info()
373 return self.0.lock().sys_info.clone(); in sys_info()
392 bus_register(platform_device.clone()).map_err(|e| e.into())?; in platform_bus_init()
394 platform_device.set_driver(Some(platform_driver.clone())); in platform_bus_init()
395 bus_driver_register(platform_driver.clone()).map_err(|e| e.into())?; in platform_bus_init()
/DragonOS-0.1.8/kernel/src/filesystem/devfs/
Dmod.rs38 return self.root_inode.clone(); in root_inode()
85 let dev_root: Arc<LockedDevFSInode> = self.root_inode.clone(); in register_bultinin_device()
103 let dev_root_inode: Arc<LockedDevFSInode> = self.root_inode.clone(); in register_device()
118 dev_char_inode.add_dev(name, device.clone())?; in register_device()
122 dev_root_inode.add_dev(name, device.clone())?; in register_device()
124 device.set_fs(dev_char_inode.0.lock().fs.clone()); in register_device()
137 dev_block_inode.add_dev(name, device.clone())?; in register_device()
138 device.set_fs(dev_block_inode.0.lock().fs.clone()); in register_device()
154 let dev_root_inode: Arc<LockedDevFSInode> = self.root_inode.clone(); in unregister_device()
307 parent: guard.self_ref.clone(), in do_create_with_data()
[all …]
/DragonOS-0.1.8/kernel/src/filesystem/sysfs/
Dmod.rs36 return __SYS_DEVICES_INODE.as_ref().unwrap().clone(); in SYS_DEVICES_INODE()
45 return __SYS_BUS_INODE.as_ref().unwrap().clone(); in SYS_BUS_INODE()
54 return __SYS_CLASS_INODE.as_ref().unwrap().clone(); in SYS_CLASS_INODE()
63 return __SYS_FS_INODE.as_ref().unwrap().clone(); in SYS_FS_INODE()
80 return self.root_inode.clone(); in root_inode()
201 return Ok(self.0.lock().metadata.clone()); in metadata()
260 return Ok(inode.children.get(name).ok_or(SystemError::ENOENT)?.clone()); in find()
304 parent: guard.self_ref.clone(), in do_create_with_data()
323 fs: guard.fs.clone(), in do_create_with_data()
330 guard.children.insert(String::from(_name), result.clone()); in do_create_with_data()
[all …]
/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dfile.rs289 return self.inode.clone(); in inode()
297 inode: self.inode.clone(), in try_clone()
298 offset: self.offset.clone(), in try_clone()
299 mode: self.mode.clone(), in try_clone()
300 file_type: self.file_type.clone(), in try_clone()
301 readdir_subdirs_name: self.readdir_subdirs_name.clone(), in try_clone()
302 private_data: self.private_data.clone(), in try_clone()
412 pub fn clone(&self) -> Box<FileDescriptorVec> { in clone() method
Dcore.rs43 return __ROOT_INODE.as_ref().unwrap().clone(); in ROOT_INODE()
149 do_migrate(new_root_inode.clone(), "proc", proc)?; in migrate_virtual_filesystem()
150 do_migrate(new_root_inode.clone(), "dev", dev)?; in migrate_virtual_filesystem()
151 do_migrate(new_root_inode.clone(), "sys", sys)?; in migrate_virtual_filesystem()
177 .clone(); in mount_root_fs()
277 let errno = inode.clone().unwrap_err(); in do_unlink_at()
Dmount.rs80 return self.inner_filesystem.clone(); in inner_filesystem()
177 return self.mount_fs.clone(); in fs()
209 mount_fs: self.mount_fs.clone(), in create()
276 mount_fs: self.mount_fs.clone(), in find()
288 mount_fs: self.mount_fs.clone(), in find()
335 .insert(metadata.inode_id, new_mount_fs.clone()); in mount()
/DragonOS-0.1.8/kernel/src/driver/base/device/
Dbus.rs170 return self.0.lock().sys_info.clone(); in sys_info()
178 BUS_MANAGER.add_bus(bus.id_table(), bus.clone()); in bus_register()
193 BUS_MANAGER.add_bus(bus.id_table(), bus.clone()); in bus_unregister()
201 BUS_MANAGER.add_driver(bus_driver.id_table(), bus_driver.clone()); in bus_driver_register()
210 BUS_MANAGER.add_driver(bus_driver.id_table(), bus_driver.clone()); in bus_driver_unregister()
Dmod.rs243 return self.0.lock().sys_info.clone(); in sys_info()
271 DEVICE_MANAGER.add_device(device.id_table(), device.clone()); in device_register()
285 DEVICE_MANAGER.add_device(device.id_table(), device.clone()); in device_unregister()
/DragonOS-0.1.8/kernel/src/driver/net/
Dvirtio_net.rs28 fn clone(&self) -> Self { in clone() method
30 inner: self.inner.clone(), in clone()
152 VirtioNetToken::new(self.clone(), Some(buf)), in receive()
153 VirtioNetToken::new(self.clone(), None), in receive()
164 return Some(VirtioNetToken::new(self.clone(), None)); in transmit()
231 NET_DRIVERS.write().insert(iface.nic_id(), iface.clone()); in virtio_net()
258 return self.name.clone(); in name()
/DragonOS-0.1.8/kernel/src/libs/
Drbtree.rs65 fn clone(&self) -> NodePtr<K, V> { in clone() method
161 let mut temp = self.clone(); in min_node()
170 let mut temp = self.clone(); in max_node()
242 unsafe { (*self.0).parent.clone() } in parent()
250 unsafe { (*self.0).left.clone() } in left()
258 unsafe { (*self.0).right.clone() } in right()
274 let mut node = NodePtr::new((*self.0).key.clone(), (*self.0).value.clone()); in deep_clone()
356 fn clone(&self) -> RBTree<K, V> { in clone() method
482 fn clone(&self) -> Keys<'a, K, V> { in clone() method
484 inner: self.inner.clone(), in clone()
[all …]
/DragonOS-0.1.8/kernel/src/time/
Dclocksource.rs150 self.last_check = self.watchdog.as_ref().unwrap().clone().read(); in clocksource_start_watchdog()
339 cs.update_clocksource_data(cs_data.clone())?; in clocksource_enqueue_watchdog()
344 list_guard.push_back(cs.clone()); in clocksource_enqueue_watchdog()
353 .clone() in clocksource_enqueue_watchdog()
403 .clone() in clocksource_dequeue_watchdog()
456 let watchdog = locked_watchdog.get_watchdog().clone(); in clocksource_dequeue_watchdog()
467 let new_wd = temp_list.front().unwrap().clone(); in clocksource_dequeue_watchdog()
663 let cur_watchdog = cs_watchdog.watchdog.as_ref().unwrap().clone(); in clocksource_watchdog()
700 cs.update_clocksource_data(cs_data.clone())?; in clocksource_watchdog()
712 cs.update_clocksource_data(cs_data.clone())?; in clocksource_watchdog()
[all …]
Djiffies.rs41 return inner.data.clone(); in clocksource_data()
85 DEFAULT_CLOCK.clone() in clocksource_default_clock()
/DragonOS-0.1.8/kernel/src/driver/base/map/
Dmod.rs56 Probe::new(data.clone()), in kobj_map()
90 return Some(value.0.clone()); in kobj_lookup()
/DragonOS-0.1.8/kernel/src/process/
Dprocess.rs162 let new_fd_vec: &mut FileDescriptorVec = Box::leak(old_fds.clone()); in copy_files()
346 let result = Arc::clone(&arc_wrapper); in address_space()
360 File::new(tty_inode.clone(), FileMode::O_RDONLY).expect("Init stdio: can't create stdin"); in init_stdio()
362 File::new(tty_inode.clone(), FileMode::O_WRONLY).expect("Init stdio: can't create stdout"); in init_stdio()
363 let stderr = File::new(tty_inode.clone(), FileMode::O_WRONLY | FileMode::O_SYNC) in init_stdio()
Dc_adapter.rs89 let state: &mut FpState = Box::leak(Box::new(s.clone())); in rs_dup_fpstate()
/DragonOS-0.1.8/kernel/src/filesystem/fat/
Dentry.rs558 self.check_existence(name, Some(false), fs.clone()); in create_file()
582 fs.clone(), in create_file()
597 self.check_existence(name, Some(true), fs.clone()); in create_dir()
655 fs.clone(), in create_dir()
686 self.find_entry(name, expect_dir, Some(&mut sng), fs.clone()); in check_existence()
729 short_dentry.name = short_name.clone();
740 self.find_free_entries(num_entries, fs.clone())?;
747 FATDirEntryOffsetIter::new(fs.clone(), start_loc, num_entries, None).collect();
755 long_entry.flush(fs.clone(), bytes_offset)?;
797 let e: FATDirEntry = self.find_entry(name, None, None, fs.clone())?; in remove()
[all …]
/DragonOS-0.1.8/kernel/src/driver/keyboard/
Dps2_keyboard.rs26 .clone();
51 f_ops: f_ops.clone(), // 从引用复制一遍获取所有权 in new()
157 return Ok(self.0.read().metadata.clone()); in metadata()
/DragonOS-0.1.8/kernel/src/filesystem/ramfs/
Dmod.rs58 return self.root_inode.clone(); in root_inode()
202 let mut metadata = inode.metadata.clone(); in metadata()
250 parent: inode.self_ref.clone(), in create_with_data()
270 fs: inode.fs.clone(), in create_with_data()
277 inode.children.insert(String::from(name), result.clone()); in create_with_data()
390 return Ok(inode.children.get(name).ok_or(SystemError::ENOENT)?.clone()); in find()
/DragonOS-0.1.8/kernel/src/net/
Dsocket.rs142 fn clone(&self) -> Self { in clone() method
336 let iface = NET_DRIVERS.read().get(&0).unwrap().clone(); in write()
396 Ok(self.metadata.clone()) in metadata()
400 return Box::new(self.clone()); in box_clone()
461 PORT_MANAGER.get_port(self.metadata.socket_type, ip.port, self.handle.clone())?; in do_bind()
598 Ok(self.metadata.clone()) in metadata()
602 return Box::new(self.clone()); in box_clone()
627 return self.remote_endpoint.clone(); in peer_endpoint()
816 let iface: Arc<dyn NetDriver> = NET_DRIVERS.write().get(&0).unwrap().clone(); in connect()
887 PORT_MANAGER.get_port(self.metadata.socket_type, ip.port, self.handle.clone())?; in bind()
[all …]
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/
Dmod.rs141 LockedAhciInode::new(disks_list.last().unwrap().clone()), in ahci_rust_init()
166 return disks_list.clone(); in disks()
175 return Ok(disks_list[i].clone()); in get_disks_by_name()
/DragonOS-0.1.8/docs/introduction/
Dbuild_system.md17 git clone https://github.com/DragonOS-Community/DragonOS
25 然后通过以下命令来克隆代码,防止频繁出现git clone、pull、push失败的情况。
28 git clone git@github.com:DragonOS-Community/DragonOS.git
/DragonOS-0.1.8/kernel/src/mm/
Ducontext.rs177 new_guard.mappings.vmas.insert(new_vma.clone()); in try_clone()
432 let r = r.lock().region().clone(); in mprotect()
449 self.mappings.insert_vma(r.clone()); in mprotect()
611 return Some(v.clone()); in contains()
743 let region = vma.lock().region.clone(); in insert_vma()
909 let mut vma: VMA = unsafe { guard.clone() }; in extract()
917 let mut vma: VMA = unsafe { guard.clone() }; in extract()
965 pub unsafe fn clone(&self) -> Self { in clone() method
970 user_address_space: self.user_address_space.clone(), in clone()
971 self_ref: self.self_ref.clone(), in clone()
/DragonOS-0.1.8/kernel/src/ipc/
Dsyscall.rs32 let read_file = File::new(pipe_ptr.clone(), FileMode::O_RDONLY)?; in pipe()
33 let write_file = File::new(pipe_ptr.clone(), FileMode::O_WRONLY)?; in pipe()
/DragonOS-0.1.8/kernel/src/driver/tty/
Dtty_device.rs73 return self.private_data.read().name.clone(); in name()
229 return Ok(self.private_data.read().metadata.clone()); in metadata()
309 guard.insert("tty0".to_string(), tty.clone()); in tty_init()
/DragonOS-0.1.8/kernel/src/filesystem/procfs/
Dmod.rs221 return self.root_inode.clone(); in root_inode()
444 let metadata = inode.metadata.clone(); in metadata()
492 parent: inode.self_ref.clone(), in create_with_data()
512 fs: inode.fs.clone(), in create_with_data()
523 inode.children.insert(String::from(name), result.clone()); in create_with_data()
605 return Ok(inode.children.get(name).ok_or(SystemError::ENOENT)?.clone()); in find()

12