/DragonOS/kernel/src/libs/ |
H A D | wait_queue.rs | 42 ProcessManager::mark_sleep(interruptible).unwrap_or_else(|e| { in prepare_to_wait_event() 43 panic!("sleep error: {:?}", e); in prepare_to_wait_event() 68 ProcessManager::mark_sleep(true).unwrap_or_else(|e| { in sleep() 69 panic!("sleep error: {:?}", e); in sleep() 84 ProcessManager::mark_sleep(true).unwrap_or_else(|e| { in sleep_with_func() 85 panic!("sleep error: {:?}", e); in sleep_with_func() 114 ProcessManager::mark_sleep(true).unwrap_or_else(|e| { in sleep_without_schedule() 115 panic!("sleep error: {:?}", e); in sleep_without_schedule() 126 ProcessManager::mark_sleep(false).unwrap_or_else(|e| { in sleep_without_schedule_uninterruptible() 127 panic!("sleep error: {:?}", e); in sleep_without_schedule_uninterruptible() [all …]
|
/DragonOS/user/apps/test_socket/src/ |
H A D | main.rs | 8 if let Err(e) = test_unix_stream() { in main() 9 println!("[ fault ] test_unix_stream, err: {}", e); in main() 14 if let Err(e) = test_unix_stream_pair() { in main() 15 println!("[ fault ] test_unix_stream_pair, err: {}", e); in main()
|
/DragonOS/kernel/src/filesystem/sysfs/ |
H A D | group.rs | 40 if let Err(e) = self.do_create_group(kobj, group, update) { in do_create_groups() 48 return Err(e); in do_create_groups() 87 .map_err(|e| { in do_create_group() 88 if e == SystemError::EEXIST { in do_create_group() 91 e in do_create_group() 98 if let Err(e) = self.group_create_files(parent_inode.clone(), kobj, group, update) { in do_create_group() 102 return Err(e); in do_create_group() 174 let mut e = Ok(()); in group_create_files() localVariable 199 e = sysfs_instance().add_file_with_mode(&parent, *attr, mode); in group_create_files() 200 if e.is_err() { in group_create_files() [all …]
|
/DragonOS/kernel/src/driver/pci/ |
H A D | attr.rs | 62 .map_err(|e: Arc<dyn KObject>| { in show() 63 warn!("device:{:?} is not a pci device!", e); in show() 93 .map_err(|e: Arc<dyn KObject>| { in show() 94 warn!("device:{:?} is not a pci device!", e); in show() 124 .map_err(|e: Arc<dyn KObject>| { in show() 125 warn!("device:{:?} is not a pci device!", e); in show() 155 .map_err(|e: Arc<dyn KObject>| { in show() 156 warn!("device:{:?} is not a pci device!", e); in show() 186 .map_err(|e: Arc<dyn KObject>| { in show() 187 warn!("device:{:?} is not a pci device!", e); in show() [all …]
|
/DragonOS/kernel/src/process/ |
H A D | fork.rs | 175 Self::copy_process(¤t_pcb, &pcb, args, current_trapframe).map_err(|e| { in fork() 180 e in fork() 182 e in fork() 187 procfs_register_pid(pcb.pid()).unwrap_or_else(|e| { in fork() 191 e in fork() 197 ProcessManager::wakeup(&pcb).unwrap_or_else(|e| { in fork() 201 e in fork() 251 let new_address_space = old_address_space.write_irqsave().try_clone().unwrap_or_else(|e| { in copy_mm() 254 current_pcb.pid(), new_pcb.pid(), e in copy_mm() 428 sched_fork(pcb).unwrap_or_else(|e| { in copy_process() [all …]
|
/DragonOS/kernel/src/arch/x86_64/kvm/vmx/ |
H A D | vmx_asm_wrapper.rs | 11 Err(e) => { in vmxon() 12 debug!("vmxon fail: {:?}", e); in vmxon() 30 Err(e) => { in vmx_vmwrite() 31 debug!("vmx_write fail: {:?}", e); in vmx_vmwrite() 42 Err(e) => { in vmx_vmread() 43 debug!("vmx_read fail: {:?}", e); in vmx_vmread()
|
/DragonOS/user/apps/test_namespace/src/ |
H A D | main.rs | 20 Err(e) => println!("Error waiting for child process: {:?}", e), in main() 26 if let Err(e) = sched::unshare(clone_flags) { in main() 27 println!("Failed to unshare: {:?}", e); in main()
|
/DragonOS/kernel/src/init/ |
H A D | initial_kthread.rs | 41 .inspect_err(|e| log::error!("ahci_init failed: {:?}", e)) in kernel_init() 93 .unwrap_or_else(|e| { in switch_to_user() 96 path, e in switch_to_user() 125 if let Err(e) = run_init_process(proc_init_info, trap_frame) { in try_to_run_init_process() 126 if e != SystemError::ENOENT { in try_to_run_init_process() 129 e in try_to_run_init_process() 134 return Err(e); in try_to_run_init_process()
|
H A D | init.rs | 62 if let Err(e) = textui_init() { in do_start_kernel() 63 warn!("Failed to init textui: {:?}", e); in do_start_kernel() 112 .inspect_err(|e| { in init_before_mem_init() 113 log::error!("Failed to init kernel cmdline: {:?}", e); in init_before_mem_init()
|
/DragonOS/kernel/src/driver/base/device/ |
H A D | dd.rs | 155 if let Err(e) = r { in do_device_attach_driver() 157 if e != SystemError::ENOSYS { in do_device_attach_driver() 161 e in do_device_attach_driver() 163 return Err(e); in do_device_attach_driver() 219 if let Err(e) = r.as_ref() { in device_bind_driver() 223 e in device_bind_driver() 405 self.add_to_sysfs(device).map_err(|e| { in really_probe() 409 e in really_probe() 413 e in really_probe() 416 self.call_driver_probe(device, driver).map_err(|e| { in really_probe() [all …]
|
H A D | driver.rs | 243 let err_remove_device = |e| { in driver_sysfs_add() 245 Err(e) in driver_sysfs_add() 248 let err_remove_driver = |e| { in driver_sysfs_add() 250 err_remove_device(e) in driver_sysfs_add() 255 if let Err(e) = in driver_sysfs_add() 258 return err_remove_device(e); in driver_sysfs_add() 261 if let Err(e) = device_manager().create_file(dev, &DeviceAttrCoredump) { in driver_sysfs_add() 262 return err_remove_driver(e); in driver_sysfs_add()
|
/DragonOS/kernel/src/exception/ |
H A D | manage.rs | 173 |e: SystemError, mut action_guard: SpinLockGuard<'_, InnerIrqAction>| -> SystemError { in inner_setup_irq() 186 return e; in inner_setup_irq() 189 let err_out_bus_unlock = |e: SystemError, in inner_setup_irq() 196 return err_out_thread(e, action_guard); in inner_setup_irq() 199 let err_out_unlock = |e: SystemError, in inner_setup_irq() 206 return err_out_bus_unlock(e, desc, req_mutex_guard, action_guard); in inner_setup_irq() 265 if let Err(e) = self.setup_irq_thread(irq, secondary_guard.deref(), true) { in inner_setup_irq() 266 return Err(err_out_thread(e, action_guard)); in inner_setup_irq() 303 if let Err(e) = self.irq_request_resources(desc.clone()) { in inner_setup_irq() 309 e in inner_setup_irq() [all …]
|
H A D | resend.rs | 74 if let Err(e) = desc_inner_guard in try_retrigger() 80 if e != SystemError::ENOSYS { in try_retrigger() 81 return Err(e); in try_retrigger()
|
/DragonOS/kernel/src/bpf/helper/ |
H A D | mod.rs | 63 Err(e) => e as i64, in raw_perf_event_output() 105 Err(e) => e as i64, in raw_bpf_probe_read() 134 Err(e) => e as _, in raw_map_update_elem() 155 Err(e) => e as i64, in raw_map_delete_elem() 193 Err(e) => e as i64, in raw_map_for_each_elem() 251 Err(e) => e as i64, in raw_map_push_elem() 272 Err(e) => e as i64, in raw_map_pop_elem() 293 Err(e) => e as i64, in raw_map_peek_elem()
|
/DragonOS/kernel/src/driver/base/ |
H A D | kobject.rs | 148 let r = attr.show(kobj, buf).map_err(|e| { in show() 149 if e == SystemError::ENOSYS { in show() 152 e in show() 165 let r = attr.store(kobj, buf).map_err(|e| { in store() 166 if e == SystemError::ENOSYS { in store() 169 e in store() 208 if let Err(e) = r { in add_kobj() 214 if e == SystemError::EEXIST { in add_kobj() 218 return Err(e); in add_kobj() 234 if let Err(e) = r { in create_dir() [all …]
|
/DragonOS/kernel/src/common/math/ |
H A D | round.c | 20 int e = u.i >> 52 & 0x7ff; in round() local 23 if (e >= 0x3ff + 52) in round() 27 if (e < 0x3ff - 1) in round()
|
/DragonOS/tools/debugging/logmonitor/src/ |
H A D | event.rs | 50 CrosstermEvent::Key(e) => sender.send(Event::Key(e)), in new() 51 CrosstermEvent::Mouse(e) => sender.send(Event::Mouse(e)), in new()
|
H A D | main.rs | 51 Event::Backend(e) => { in start_headless_app() 52 handle_backend_events(e, &mut app)?; in start_headless_app() 89 Event::Backend(e) => { in start_tui_app() 90 handle_backend_events(e, &mut app)?; in start_tui_app()
|
/DragonOS/kernel/src/driver/firmware/efi/ |
H A D | tables.rs | 69 EarlyIoRemap::unmap(fw_ptr).map_err(|e|{ in report_systable_header() 71 e in report_systable_header() 88 if let Err(e) = r { in parse_config_tables() 109 .map_err(|e| { in parse_config_tables() 131 .map_err(|e| { in parse_config_tables() 134 e in parse_config_tables() 148 .map_err(|e| { in parse_config_tables() 151 e in parse_config_tables() 405 if let Err(e) = vaddr { in match_table() 406 return Some(Err(e)); in match_table()
|
H A D | init.rs | 58 if let Err(e) = r { in efi_init() 59 error!("Failed to initialize UEFI: {:?}", e); in efi_init() 136 .map_err(|e| { in uefi_init() 146 let st_vaddr = EarlyIoRemap::map_not_aligned(system_table, st_size, true).map_err(|e| { in uefi_init() 148 e in uefi_init() 197 .map_err(|e| { in uefi_init() 200 e in uefi_init()
|
/DragonOS/kernel/src/driver/virtio/ |
H A D | mmio.rs | 12 if let Err(e) = do_probe_virtio_mmio() { in virtio_probe_mmio() 13 error!("virtio_probe_mmio failed: {:?}", e); in virtio_probe_mmio()
|
/DragonOS/kernel/src/arch/x86_64/init/pvh/ |
H A D | mod.rs | 89 .unwrap_or_else(|e| { in early_init_memory_blocks() 94 e in early_init_memory_blocks() 101 .unwrap_or_else(|e| { in early_init_memory_blocks() 106 e in early_init_memory_blocks()
|
/DragonOS/kernel/src/arch/x86_64/syscall/ |
H A D | mod.rs | 113 .unwrap_or_else(|e| e.to_posix_errno() as usize), in syscall_handler() 122 .unwrap_or_else(|e| e.to_posix_errno() as usize) as u64, in syscall_handler()
|
/DragonOS/kernel/src/arch/riscv64/syscall/ |
H A D | mod.rs | 40 .unwrap_or_else(|e| e.to_posix_errno() as usize), in syscall_handler()
|
/DragonOS/build-scripts/kernel_build/src/utils/ |
H A D | mod.rs | 32 if let Some(e) = ext_name { in list_all_files() 34 if ext == e { in list_all_files()
|