/DragonOS-0.1.8/kernel/src/process/ |
D | c_adapter.rs | 29 let r = current_pcb().init_files(); in process_init_files() localVariable 30 if r.is_ok() { in process_init_files() 33 return r.unwrap_err().to_posix_errno(); in process_init_files() 54 let r = current_pcb().copy_files(clone_flags, from); in process_copy_files() localVariable 55 if r.is_ok() { in process_copy_files() 58 return r.unwrap_err().to_posix_errno(); in process_copy_files() 69 let r: Result<(), SystemError> = pcb.exit_files(); in process_exit_files() localVariable 70 if r.is_ok() { in process_exit_files() 73 return r.unwrap_err().to_posix_errno(); in process_exit_files() 109 let r = init_stdio(); in rs_init_stdio() localVariable [all …]
|
D | process.rs | 197 let r: Option<&mut FileDescriptorVec> = FileDescriptorVec::from_pcb(current_pcb()); in alloc_fd() localVariable 198 if r.is_none() { in alloc_fd() 203 r.unwrap() in alloc_fd() 239 let r: &mut FileDescriptorVec = FileDescriptorVec::from_pcb(current_pcb()).unwrap(); in get_file_mut_by_fd() localVariable 240 return r.fds[fd as usize].as_deref_mut(); in get_file_mut_by_fd() 253 let r: &mut FileDescriptorVec = FileDescriptorVec::from_pcb(current_pcb()).unwrap(); in get_file_ref_by_fd() localVariable 254 return r.fds[fd as usize].as_deref(); in get_file_ref_by_fd() 265 let r: &mut FileDescriptorVec = FileDescriptorVec::from_pcb(current_pcb()).unwrap(); in drop_fd() localVariable 267 let f: Option<&File> = r.fds[fd as usize].as_deref(); in drop_fd() 276 r.fds[fd as usize] = None; in drop_fd()
|
D | fork.rs | 28 let r = RefCount::convert_mut(unsafe { &mut (*(current_pcb().sighand)).count }).unwrap(); in process_copy_sighand() localVariable 29 refcount_inc(r); in process_copy_sighand()
|
/DragonOS-0.1.8/kernel/src/driver/tty/ |
D | tty_device.rs | 87 let r: Result<usize, TtyError> = self.core.input(buf, false); in input() localVariable 88 if r.is_ok() { in input() 89 return Ok(r.unwrap()); in input() 92 let r = r.unwrap_err(); in input() localVariable 93 match r { in input() 159 let r: Result<usize, TtyError> = self.core.read_stdin(&mut buf[0..len], true); in read_at() localVariable 160 if r.is_ok() { in read_at() 161 return Ok(r.unwrap()); in read_at() 164 match r.unwrap_err() { in read_at() 194 let r: Result<usize, TtyError> = if data.flags.contains(TtyFileFlag::STDOUT) { in write_at() localVariable [all …]
|
D | mod.rs | 202 let r: Result<mpsc::SendRef<u8>, TrySendError> = self.stdin_tx.try_send_ref(); in write_stdin() localVariable 203 if let Err(e) = r { in write_stdin() 216 *r.unwrap() = buf[cnt]; in write_stdin() 267 let r: Result<mpsc::SendRef<u8>, TrySendError> = self.output_tx.try_send_ref(); in write_output() localVariable 268 if let Err(e) = r { in write_output() 281 *r.unwrap() = buf[cnt]; in write_output()
|
/DragonOS-0.1.8/kernel/src/libs/ |
D | refcount.rs | 50 pub fn refcount_inc(r: &mut RefCount) { in refcount_inc() 51 if atomic_read(&r.refs) == 0 { in refcount_inc() 56 atomic_inc(&mut r.refs); in refcount_inc() 63 pub fn refcount_dec(r: &mut RefCount) { in refcount_dec() 65 atomic_dec(&mut r.refs); in refcount_dec()
|
D | rwlock.rs | 117 let r = self.inner_try_read(); in try_read() localVariable 118 if r.is_none() { in try_read() 121 return r; in try_read() 181 let r = self.inner_try_write(); in try_write() localVariable 182 if r.is_none() { in try_write() 186 return r; in try_write() 224 let r = self.inner_try_upgradeable_read(); in try_upgradeable_read() localVariable 225 if r.is_none() { in try_upgradeable_read() 229 return r; in try_upgradeable_read()
|
/DragonOS-0.1.8/kernel/src/time/ |
D | timekeep.rs | 21 let r = rtc_time.get(); in ktime_get_real() localVariable 23 if r.is_err() { in ktime_get_real() 24 return r.unwrap_err() as ktime_t; in ktime_get_real()
|
D | syscall.rs | 61 let r: Result<usize, SystemError> = nanosleep(slt_spec).map(|slt_spec| { in nanosleep() localVariable 69 return r; in nanosleep()
|
D | timer.rs | 117 let r = self.0.lock().timer_func.run(); in run() localVariable 118 if unlikely(r.is_err()) { in run() 121 r.err().unwrap() in run()
|
/DragonOS-0.1.8/kernel/src/mm/ |
D | ucontext.rs | 377 for r in regions { in munmap() 378 let r = r.lock().region; in munmap() localVariable 379 let r = self.mappings.remove_vma(&r).unwrap(); in munmap() localVariable 380 let intersection = r.lock().region().intersect(&to_unmap).unwrap(); in munmap() 381 let (before, r, after) = r.extract(intersection).unwrap(); in munmap() 395 r.unmap(&mut self.user_mapper.utable, &mut flusher); in munmap() 430 for r in regions { in mprotect() 432 let r = r.lock().region().clone(); in mprotect() localVariable 433 let r = self.mappings.remove_vma(&r).unwrap(); in mprotect() localVariable 435 let intersection = r.lock().region().intersect(®ion).unwrap(); in mprotect() [all …]
|
D | syscall.rs | 96 let r = unsafe { address_space.sbrk(incr) }; in sbrk() localVariable 99 return r; in sbrk()
|
D | page.rs | 237 let mut r = unsafe { in new() localVariable 248 r = r.set_execute(true); in new() 252 return r; in new() 293 let r = Self::from_data(Arch::ENTRY_FLAG_DEFAULT_TABLE | Arch::ENTRY_FLAG_READWRITE); in new_page_table() localVariable 295 r.set_user(true) in new_page_table() 297 r in new_page_table()
|
/DragonOS-0.1.8/kernel/src/ |
D | lib.rs | 110 let r = net_init(); in __rust_demo_func() localVariable 111 if r.is_err() { in __rust_demo_func() 112 kwarn!("net_init() failed: {:?}", r.err().unwrap()); in __rust_demo_func()
|
/DragonOS-0.1.8/kernel/src/syscall/ |
D | mod.rs | 409 let r = match syscall_num { in handle() localVariable 534 let r: Result<&str, SystemError> = chdir_check(args[0]); in handle() localVariable 535 if r.is_err() { in handle() 536 Err(r.unwrap_err()) in handle() 538 Self::chdir(r.unwrap()) in handle() 762 let r = security_check(); in handle() localVariable 763 if r.is_err() { in handle() 764 Err(r.unwrap_err()) in handle() 844 let r = security_check(); in handle() localVariable 845 if r.is_err() { in handle() [all …]
|
/DragonOS-0.1.8/kernel/src/arch/x86_64/ |
D | syscall.rs | 143 let r: Result<(String, Vec<String>, Vec<String>), SystemError> = x(); in rs_do_execve() localVariable 144 if let Err(e) = r { in rs_do_execve() 147 let (path, argv, envp) = r.unwrap(); in rs_do_execve() 168 let r = tmp_rs_execve(path, argv, envp, regs); in rs_exec_init_process() localVariable 170 return r.map(|_| 0).unwrap_or_else(|e| e.to_posix_errno() as usize); in rs_exec_init_process()
|
/DragonOS-0.1.8/kernel/src/filesystem/vfs/ |
D | core.rs | 116 let r = new_root_inode.find(mountpoint_name); in do_migrate() localVariable 117 let mountpoint = if r.is_err() { in do_migrate() 122 r.unwrap() in do_migrate() 190 let r = migrate_virtual_filesystem(fatfs); in mount_root_fs() localVariable 191 if r.is_err() { in mount_root_fs()
|
D | file.rs | 368 let r: Result<(), SystemError> = self.inode.close(&mut self.private_data); in drop() localVariable 370 if r.is_err() { in drop() 375 r.unwrap_err() in drop()
|
D | syscall.rs | 184 let r = current_pcb().alloc_fd(file, None).map(|fd| fd as usize); in open() localVariable 186 return r; in open() 566 let r = file.ftruncate(len).map(|_| 0); in ftruncate() localVariable 567 return r; in ftruncate()
|
/DragonOS-0.1.8/kernel/src/libs/libUI/ |
D | textui-render.c | 17 #define calculate_color(r, g, b) ((((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff)) & 0x00fffff… argument
|
/DragonOS-0.1.8/kernel/src/driver/disk/ahci/ |
D | mod.rs | 44 let r = ahci_rust_init(); in ahci_init() localVariable 45 if r.is_ok() { in ahci_init() 48 return r.unwrap_err().to_posix_errno(); in ahci_init()
|
/DragonOS-0.1.8/kernel/src/filesystem/fat/ |
D | fs.rs | 1185 let r = self.umount(); in drop() localVariable 1186 if r.is_err() { in drop() 1189 r.unwrap_err() in drop() 1365 let r = f.read( in read_at() localVariable 1371 return r; in read_at() 1395 let r = f.write(fs, &buf[0..len], offset as u64); in write_at() localVariable 1397 return r; in write_at() 1585 let r = dir.remove(guard.fs.upgrade().unwrap().clone(), name, true); in unlink() localVariable 1587 return r; in unlink() 1612 let r: Result<(), SystemError> = in rmdir() localVariable [all …]
|
D | entry.rs | 133 let r = fs.partition.disk().device().read_at( in read() localVariable 140 read_ok += r; in read() 141 start += r; in read() 142 in_cluster_offset += r as u64; in read() 557 let r: Result<FATDirEntryOrShortName, SystemError> = in create_file() localVariable 560 if r.is_err() { in create_file() 561 let err_val = r.unwrap_err(); in create_file() 569 match r.unwrap() { in create_file() 596 let r: Result<FATDirEntryOrShortName, SystemError> = in create_dir() localVariable 600 if r.is_err() { in create_dir() [all …]
|
/DragonOS-0.1.8/kernel/src/driver/keyboard/ |
D | ps2_keyboard.rs | 102 let r = unsafe { in read_at() localVariable 110 return Ok(r as usize); in read_at()
|
/DragonOS-0.1.8/kernel/src/filesystem/procfs/ |
D | mod.rs | 659 let r = procfs_register_pid(pid); in rs_procfs_register_pid() localVariable 660 if r.is_ok() { in rs_procfs_register_pid() 663 return r.unwrap_err() as u64; in rs_procfs_register_pid() 685 let r = procfs_unregister_pid(pid); in rs_procfs_unregister_pid() localVariable 686 if r.is_ok() { in rs_procfs_unregister_pid() 689 return r.unwrap_err() as u64; in rs_procfs_unregister_pid()
|