Home
last modified time | relevance | path

Searched refs:r (Results 1 – 16 of 16) sorted by relevance

/DragonOS-0.1.5/kernel/src/process/
Dprocess.rs185 let r: Option<&mut FileDescriptorVec> = FileDescriptorVec::from_pcb(current_pcb()); in alloc_fd() localVariable
186 if r.is_none() { in alloc_fd()
191 r.unwrap() in alloc_fd()
215 let r: &mut FileDescriptorVec = FileDescriptorVec::from_pcb(current_pcb()).unwrap(); in get_file_mut_by_fd() localVariable
216 return r.fds[fd as usize].as_deref_mut(); in get_file_mut_by_fd()
229 let r: &mut FileDescriptorVec = FileDescriptorVec::from_pcb(current_pcb()).unwrap(); in get_file_ref_by_fd() localVariable
230 return r.fds[fd as usize].as_deref(); in get_file_ref_by_fd()
241 let r: &mut FileDescriptorVec = FileDescriptorVec::from_pcb(current_pcb()).unwrap(); in drop_fd() localVariable
243 let f: Option<&File> = r.fds[fd as usize].as_deref(); in drop_fd()
252 r.fds[fd as usize] = None; in drop_fd()
[all …]
Dfork.rs27 let r = RefCount::convert_mut(unsafe { &mut (*(current_pcb().sighand)).count }).unwrap(); in process_copy_sighand() localVariable
28 refcount_inc(r); in process_copy_sighand()
/DragonOS-0.1.5/kernel/src/libs/
Drefcount.rs50 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()
Dlz4.c564 unsigned long r = 0; in LZ4_NbCommonBytes()
565 _BitScanForward64(&r, (U64)val); in LZ4_NbCommonBytes()
566 return (unsigned)r >> 3; in LZ4_NbCommonBytes()
580 unsigned long r; in LZ4_NbCommonBytes() local
581 _BitScanForward(&r, (U32)val); in LZ4_NbCommonBytes()
582 return (unsigned)r >> 3; in LZ4_NbCommonBytes()
745 unsigned r; in LZ4_NbCommonBytes()
748 r = 4; in LZ4_NbCommonBytes()
752 r = 0; in LZ4_NbCommonBytes()
757 r += 2; in LZ4_NbCommonBytes()
[all …]
/DragonOS-0.1.5/kernel/src/filesystem/vfs/
Dsyscall.rs37 let r: Result<i32, i32> = do_open(path, open_flags); in sys_open() localVariable
39 if r.is_ok() { in sys_open()
40 return r.unwrap() as u64; in sys_open()
42 return r.unwrap_err() as u64; in sys_open()
52 let r: Result<(), i32> = current_pcb().drop_fd(fd); in sys_close() localVariable
54 if r.is_ok() { in sys_close()
57 return r.unwrap_err() as u64; in sys_close()
81 let r: Result<usize, i32> = do_read(fd, buf); in sys_read() localVariable
83 if r.is_ok() { in sys_read()
84 return r.unwrap() as u64; in sys_read()
[all …]
Dcore.rs103 let r = new_root_inode.find(mountpoint_name); in do_migrate() localVariable
104 let mountpoint = if r.is_err() { in do_migrate()
109 r.unwrap() in do_migrate()
174 let r = migrate_virtual_filesystem(fatfs); in mount_root_fs() localVariable
175 if r.is_err() { in mount_root_fs()
Dfile.rs270 let r: Result<(), i32> = self.inode.close(&mut self.private_data); in drop() localVariable
272 if r.is_err() { in drop()
277 r.unwrap_err() in drop()
Dmount.rs246 let r = self.inner_inode.rmdir(name); in rmdir() localVariable
248 return r; in rmdir()
/DragonOS-0.1.5/kernel/src/time/
Dtimekeep.rs21 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()
/DragonOS-0.1.5/kernel/src/libs/libUI/
Dtextui-render.c17 #define calculate_color(r, g, b) ((((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff)) & 0x00fffff… argument
/DragonOS-0.1.5/kernel/src/driver/disk/ahci/
Dmod.rs43 let r = ahci_rust_init(); in ahci_init() localVariable
44 if r.is_ok() { in ahci_init()
47 return r.unwrap_err(); in ahci_init()
Dahci.h290 uint8_t r : 1; // Reset member
/DragonOS-0.1.5/kernel/src/filesystem/fat/
Dfs.rs1175 let r = self.umount(); in drop() localVariable
1176 if r.is_err() { in drop()
1179 r.unwrap_err() in drop()
1355 let r = f.read( in read_at() localVariable
1361 return r; in read_at()
1385 let r = f.write(fs, &buf[0..len], offset as u64); in write_at() localVariable
1387 return r; in write_at()
1539 let r = dir.remove(guard.fs.upgrade().unwrap().clone(), name, true); in unlink() localVariable
1541 return r; in unlink()
1567 let r: Result<(), i32> = dir.remove(guard.fs.upgrade().unwrap().clone(), name, true); in rmdir() localVariable
[all …]
Dentry.rs132 let r = fs.partition.disk().device().read_at( in read() localVariable
139 read_ok += r; in read()
140 start += r; in read()
141 in_cluster_offset += r as u64; in read()
541 let r: Result<FATDirEntryOrShortName, i32> = in create_file() localVariable
544 if r.is_err() { in create_file()
545 let err_val = r.unwrap_err(); in create_file()
553 match r.unwrap() { in create_file()
580 let r: Result<FATDirEntryOrShortName, i32> = in create_dir() localVariable
584 if r.is_err() { in create_dir()
[all …]
/DragonOS-0.1.5/kernel/src/driver/keyboard/
Dps2_keyboard.rs87 let r = unsafe { in read_at() localVariable
95 return Ok(r as usize); in read_at()
/DragonOS-0.1.5/kernel/src/filesystem/procfs/
Dmod.rs659 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()