Home
last modified time | relevance | path

Searched refs:as_ref (Results 1 – 25 of 109) sorted by relevance

12345

/DragonOS/tools/debugging/logmonitor/src/backend/
H A Derror.rs27 write!(f, "File not found: {:?}", self.message.as_ref().unwrap()) in fmt()
33 self.message.as_ref().unwrap() in fmt()
/DragonOS/kernel/src/libs/
H A Dlock_free_flags.rs25 (self.inner.get().as_ref().unwrap() as *const T as *mut T) in get_mut()
32 unsafe { self.inner.get().as_ref().unwrap() } in get()
/DragonOS/kernel/src/arch/x86_64/driver/
H A Dhpet.rs40 unsafe { HPET_INSTANCE.as_ref().unwrap() } in hpet_instance()
45 if unsafe { HPET_INSTANCE.as_ref().is_some() } { in is_hpet_enabled()
46 return unsafe { HPET_INSTANCE.as_ref().unwrap().enabled() }; in is_hpet_enabled()
76 .as_ref() in new()
191 .as_ref() in timer()
218 let regs = unsafe { inner.registers_ptr.as_ref() }; in hpet_regs()
/DragonOS/kernel/src/filesystem/overlayfs/
H A Dcopy_up.rs16 let lower_inode = self.lower_inode.as_ref().ok_or(SystemError::ENOENT)?; in copy_up()
35 .as_ref() in create_upper_inode()
/DragonOS/kernel/src/arch/x86_64/driver/apic/
H A Dmod.rs527 } else if let Some(xapic) = current_xapic_instance().borrow().as_ref() { in send_eoi()
538 .as_ref() in version()
550 .as_ref() in support_eoi_broadcast_suppression()
562 .as_ref() in max_lvt_entry()
574 .as_ref() in id()
594 .as_ref() in read_lvt()
611 } else if let Some(xapic) = current_xapic_instance().borrow().as_ref() { in write_icr()
/DragonOS/kernel/src/exception/
H A Ddummychip.rs17 unsafe { NO_IRQ_CHIP.as_ref().unwrap().clone() } in no_irq_chip()
23 unsafe { DUMMY_IRQ_CHIP.as_ref().unwrap().clone() } in dummy_irq_chip()
/DragonOS/kernel/src/mm/
H A Dkernel_mapper.rs84 pub fn as_ref(&self) -> &PageMapper { in as_ref() method
148 return self.as_ref(); in deref()
/DragonOS/kernel/src/filesystem/kernfs/
H A Dmod.rs76 let ptr = root_inode.as_ref() as *const KernFSInode as *mut KernFSInode; in new()
327 if offset >= inner.symlink_target_absolute_path.as_ref().unwrap().len() { in read_at()
333 inner.symlink_target_absolute_path.as_ref().unwrap().len() - offset, in read_at()
338 .as_ref() in read_at()
357 .as_ref() in read_at()
381 .as_ref() in write_at()
416 let ptr = inode.as_ref() as *const KernFSInode as *mut KernFSInode; in new()
623 return self.inner.read().symlink_target.as_ref()?.upgrade(); in symlink_target()
/DragonOS/kernel/src/filesystem/vfs/
H A Dmount.rs86 let ptr: *mut MountFS = mount_fs.as_ref() as *const Self as *mut Self; in wrap()
116 .as_ref() in umount()
135 let ptr: *mut MountFSInode = inode.as_ref() as *const Self as *mut Self; in wrap()
605 fn as_ref(&self) -> &str { in as_ref() method
664 return __MOUNTS_LIST.as_ref().unwrap(); in MOUNT_LIST()
685 self.0.write().insert(MountPath::from(path.as_ref()), fs); in insert()
711 let strkey = key.as_ref(); in get_mount_point()
712 if let Some(rest) = path.as_ref().strip_prefix(strkey) { in get_mount_point()
/DragonOS/kernel/src/driver/acpi/
H A Dmod.rs134 RSDP_TMP_BOX.as_ref().unwrap().as_ptr() as usize in rsdp_paddr()
156 unsafe { __ACPI_TABLE.as_ref() } in tables()
221 region.virtual_start().as_ref() as *const T as usize in unmap_physical_region()
/DragonOS/kernel/src/libs/lib_ui/
H A Dscreen_manager.rs179 self_buf_guard.copy_from_slice(src_buf_guard.as_ref()); in copy_from_nonoverlapping()
195 double_buffer_guard.as_mut().copy_from_slice(x.as_ref()); in copy_from_nonoverlapping()
364 .as_ref() in scm_enable_double_buffer()
389 .as_ref() in scm_enable_put_to_window()
407 .as_ref() in scm_disable_put_to_window()
/DragonOS/kernel/src/filesystem/procfs/
H A Dsyscall.rs62 let mut kmsg_guard = unsafe { KMSG.as_ref().unwrap().lock_irqsave() }; in do_syslog()
/DragonOS/kernel/src/smp/cpu/
H A Dmod.rs27 unsafe { SMP_CPU_MANAGER.as_ref().unwrap() } in smp_cpu_manager()
259 let pcb = cpu_state.thread.as_ref().ok_or(SystemError::EINVAL)?; in do_cpuhp_kick_ap()
264 ProcessManager::wakeup(cpu_state.thread.as_ref().unwrap())?; in do_cpuhp_kick_ap()
/DragonOS/kernel/src/time/
H A Dclocksource.rs168 let mut wd_data = self.watchdog.as_ref().unwrap().clone().clocksource_data(); in clocksource_start_watchdog()
169 wd_data.watchdog_last = self.watchdog.as_ref().unwrap().clone().read(); in clocksource_start_watchdog()
171 .as_ref() in clocksource_start_watchdog()
831 let wd_now = wd.watchdog.as_ref().unwrap().clone(); in clocksource_watchdog()
832 let wd_now_data = wd_now.as_ref().clocksource_data(); in clocksource_watchdog()
833 let wd_now_clock = wd_now.as_ref().read().data(); in clocksource_watchdog()
997 if CUR_CLOCKSOURCE.lock().as_ref().is_some() { in clocksource_select()
999 let cur_clocksource = CUR_CLOCKSOURCE.lock().as_ref().unwrap().clone(); in clocksource_select()
/DragonOS/kernel/src/driver/base/block/
H A Ddisk_info.rs51 return self.disk.as_ref().unwrap().upgrade().unwrap(); in disk()
/DragonOS/kernel/src/driver/tty/
H A Dkthread.rs72 let _ = ProcessManager::wakeup(unsafe { TTY_REFRESH_THREAD.as_ref().unwrap() }); in send_to_tty_refresh_thread()
H A Dsysfs.rs25 unsafe { CLASS_TTY_INSTANCE.as_ref() } in sys_class_tty_instance()
/DragonOS/kernel/src/driver/irqchip/
H A Driscv_intc.rs33 unsafe { RISCV_INTC_CHIP.as_ref() } in riscv_intc_chip()
200 riscv_intc_domain().as_ref().or_else(|| { in riscv_intc_assicate_irq()
/DragonOS/kernel/src/filesystem/sysfs/
H A Dfile.rs74 } else if let Some(bin_attribute) = self.bin_attribute.as_ref() { in callback_read()
88 } else if let Some(bin_attribute) = self.bin_attribute.as_ref() { in callback_write()
123 if let Some(KernInodePrivateData::SysFS(SysFSKernPrivateData::Dir(dt))) = x.as_ref() { in add_file_with_mode()
241 if let Some(KernInodePrivateData::SysFS(SysFSKernPrivateData::Dir(dt))) = x.as_ref() { in add_bin_file_with_mode()
/DragonOS/kernel/src/driver/scsi/
H A Dmod.rs16 unsafe { SCSI_MANAGER.as_ref().unwrap() } in scsi_manager()
/DragonOS/kernel/src/driver/net/
H A Dclass.rs27 unsafe { CLASS_NET_INSTANCE.as_ref() } in sys_class_net_instance()
/DragonOS/kernel/src/driver/pci/
H A Droot.rs170 ((self.mmio_guard.as_ref().unwrap().vaddr().data() as *mut u32) in read_config()
200 ((self.mmio_guard.as_ref().unwrap().vaddr().data() as *mut u32) in write_config()
/DragonOS/kernel/crates/klog_types/src/
H A Dlib.rs151 &format_args!("{:#x}", *self.vaddr.as_ref().unwrap_or(&0)), in fmt()
155 &format_args!("{:#x}", self.paddr.as_ref().unwrap_or(&0)), in fmt()
/DragonOS/kernel/src/driver/virtio/
H A Dirq.rs23 unsafe { VIRTIO_IRQ_MANAGER.as_ref().unwrap() } in virtio_irq_manager()
/DragonOS/kernel/src/arch/riscv64/driver/
H A Dsbi.rs80 unsafe { addr_of!(EXTENSIONS).as_ref().unwrap() } in extensions()

12345