/DragonOS/kernel/src/driver/pci/ |
H A D | pci.rs | 120 let mut result: Vec<Arc<(dyn PciDeviceStructure)>> = Vec::new(); in get_pci_device_structures_mut_by_vendor_id() localVariable 123 result.push(box_pci_device_structure.clone()); in get_pci_device_structures_mut_by_vendor_id() 126 result in get_pci_device_structures_mut_by_vendor_id() 147 let mut result = Vec::new(); in get_pci_device_structure_mut() localVariable 152 result.push(box_pci_device_structure.clone()); in get_pci_device_structure_mut() 155 result in get_pci_device_structure_mut() 177 let mut result = Vec::new(); in get_pci_device_structure() localVariable 181 result.push(box_pci_device_structure); in get_pci_device_structure() 184 result in get_pci_device_structure() 658 let result = pci_root_0().read_config(bus_device_function, STATUS_COMMAND_OFFSET.into()); in capabilities_offset() localVariable [all …]
|
/DragonOS/user/apps/test-chown/src/ |
H A D | main.rs | 32 let result = unsafe { fchownat(AT_FDCWD, c_filename.as_ptr(), new_uid, new_gid, flags) }; in test_fchownat() localVariable 35 assert!(result != -1, "fchownat failed"); in test_fchownat() 43 let result = unsafe { chown(c_filename.as_ptr(), new_uid, new_gid) }; in test_chown() localVariable 46 assert!(result != -1, "chown failed"); in test_chown() 53 let result = unsafe { fchown(fd, new_uid, new_gid) }; in test_fchown() localVariable 56 assert!(result != -1, "fchown failed"); in test_fchown() 63 let result = unsafe { lchown(c_symlink.as_ptr(), new_uid, new_gid) }; in test_lchown() localVariable 66 assert!(result != -1, "lchown failed"); in test_lchown() 135 let result = unsafe { mount(source, target, fstype, flags, data) }; in mount_test_ramfs() localVariable 138 result, in mount_test_ramfs() [all …]
|
/DragonOS/kernel/src/time/ |
H A D | timeconv.rs | 86 let mut result = CalendarTime::new(); in time_to_calendar() localVariable 103 result.tm_hour = (rem / SECS_PER_HOUR) as i32; in time_to_calendar() 107 result.tm_min = (rem / 60) as i32; in time_to_calendar() 111 result.tm_sec = rem as i32; in time_to_calendar() 115 result.tm_wday = ((4 + days) % 7) as i32; in time_to_calendar() 125 result.tm_year = (year - 1900) as i32; in time_to_calendar() 126 result.tm_yday = days as i32; in time_to_calendar() 139 result.tm_mon = (mon - 1) as i32; in time_to_calendar() 140 result.tm_mday = (days + 1) as i32; in time_to_calendar() 142 result in time_to_calendar()
|
H A D | timer.rs | 48 let result = TIMER_JIFFIES.load(Ordering::SeqCst) + self.data(); in timer_jiffies() localVariable 49 result in timer_jiffies() 65 let result = Duration::from_millis(ms); in from() localVariable 66 result in from() 82 let result = Jiffies::new(jiffies); in from() localVariable 83 result in from() 120 let result: Arc<Timer> = Arc::new(Timer { in new() localVariable 129 result.inner.lock().self_ref = Arc::downgrade(&result); in new() 131 return result; in new()
|
/DragonOS/kernel/src/libs/ |
H A D | int_like.rs | 99 ) -> ::core::result::Result<$new_type_name, $new_type_name> { 104 Ok(result) => Ok($new_type_name::from(result)), 105 Err(result) => Err($new_type_name::from(result)), 115 ) -> ::core::result::Result<$new_type_name, $new_type_name> { 122 Ok(result) => Ok($new_type_name::from(result)), 123 Err(result) => Err($new_type_name::from(result)),
|
/DragonOS/user/apps/test-symlink/src/ |
H A D | main.rs | 58 let result = unsafe { mount(source, target, fstype, flags, data) }; in mount_test_ramfs() localVariable 61 result, in mount_test_ramfs() 71 let result = unsafe { umount(path) }; in umount_test_ramfs() localVariable 72 if result != 0 { in umount_test_ramfs() 77 assert_eq!(result, 0, "Umount myramfs failed"); in umount_test_ramfs()
|
/DragonOS/build-scripts/kernel_build/src/utils/ |
H A D | mod.rs | 17 let mut result = Vec::new(); in list_all_files() localVariable 35 result.push(ent.path()); in list_all_files() 47 return result; in list_all_files()
|
/DragonOS/user/apps/test-mount/src/ |
H A D | main.rs | 20 let result = unsafe { mount(source, target, fstype, flags, data) }; in main() localVariable 27 let result = unsafe { mount(source, target, fstype, flags, data) }; in main() localVariable 28 if result == 0 { in main()
|
/DragonOS/tools/debugging/logmonitor/src/ |
H A D | logging.rs | 12 let mut result = LoggingInitResult::new(None); in init() localVariable 17 result.tui_receiver = Some(channel.1); in init() 22 return result; in init()
|
/DragonOS/kernel/crates/rbpf/src/ |
H A D | assembler.rs | 44 let mut result = BTreeMap::new(); in make_instruction_map() localVariable 84 result.insert(name.to_string(), (inst_type, opc)) in make_instruction_map() 151 result in make_instruction_map() 215 let mut result: Vec<Insn> = vec![]; in assemble_internal() localVariable 221 Ok(insn) => result.push(insn), in assemble_internal() 227 result.push(insn(0, 0, 0, 0, imm >> 32).unwrap()); in assemble_internal() 234 Ok(result) in assemble_internal() 272 let mut result: Vec<u8> = vec![]; in assemble() localVariable 274 result.extend_from_slice(&insn.to_array()); in assemble() 276 Ok(result) in assemble()
|
/DragonOS/kernel/src/arch/x86_64/driver/apic/ |
H A D | mod.rs | 139 let mut result = Self { register, data: 0 }; in new() localVariable 140 result.set_vector((data & 0xFF) as u8); in new() 141 match result.register { in new() 144 result in new() 150 if let LVTRegister::LINT0 | LVTRegister::LINT1 = result.register { in new() 151 result.set_interrupt_input_pin_polarity((data & (1 << 13)) == 0); in new() 154 result.set_trigger_mode(TriggerMode::Level).ok()?; in new() 156 result.set_trigger_mode(TriggerMode::Edge).ok()?; in new() 159 result.set_mask((data & (1 << 16)) != 0); in new() 161 if let LVTRegister::Timer = result.register { in new() [all …]
|
/DragonOS/kernel/crates/rbpf/examples/ |
H A D | rbpf_plugin.rs | 97 let result: u64; in main() localVariable 108 result = vm.execute_program_jit(&mut memory).unwrap(); in main() 120 result = vm.execute_program_cranelift(&mut memory).unwrap(); in main() 123 result = vm.execute_program(&mut memory).unwrap(); in main()
|
/DragonOS/tools/debugging/logmonitor/src/backend/ |
H A D | loader.rs | 23 let mut result = KernelMetadata::new(kernel.clone()); in load() localVariable 28 result.add_symbol(sym.clone(), name.to_string()); in load() 30 info!("Parsed {} symbols", result.symbols().len()); in load() 32 return Ok(result); in load()
|
/DragonOS/kernel/crates/intertrait/src/ |
H A D | hasher.rs | 26 .fold(0u64, |result, b| (result << 8) | *b as u64); in write()
|
/DragonOS/kernel/src/filesystem/devfs/ |
H A D | null_dev.rs | 57 let result = Arc::new(LockedNullInode(SpinLock::new(inode))); in new() localVariable 58 result.0.lock().self_ref = Arc::downgrade(&result); in new() 60 return result; in new()
|
H A D | zero_dev.rs | 57 let result = Arc::new(LockedZeroInode(SpinLock::new(inode))); in new() localVariable 58 result.0.lock().self_ref = Arc::downgrade(&result); in new() 60 return result; in new()
|
/DragonOS/user/apps/test_statx/src/ |
H A D | main.rs | 47 let result = unsafe { in main() localVariable 58 if result != -1 { in main()
|
/DragonOS/kernel/src/filesystem/procfs/ |
H A D | mod.rs | 354 let result: Arc<ProcFS> = Arc::new(ProcFS { in new() localVariable 360 let mut root_guard: SpinLockGuard<ProcFSInode> = result.root_inode.0.lock(); in new() 361 root_guard.parent = Arc::downgrade(&result.root_inode); in new() 362 root_guard.self_ref = Arc::downgrade(&result.root_inode); in new() 363 root_guard.fs = Arc::downgrade(&result); in new() 368 let inode = result.root_inode(); in new() 398 return result; in new() 612 let result: Arc<LockedProcFSInode> = in create_with_data() localVariable 643 result.0.lock().self_ref = Arc::downgrade(&result); in create_with_data() 646 inode.children.insert(name, result.clone()); in create_with_data() [all …]
|
/DragonOS/kernel/src/virt/kvm/ |
H A D | kvm_dev.rs | 75 let result = Arc::new(LockedKvmInode(SpinLock::new(inode))); in new() localVariable 76 result.0.lock().self_ref = Arc::downgrade(&result); in new() 78 return result; in new()
|
H A D | vcpu_dev.rs | 89 let result = Arc::new(LockedVcpuInode(SpinLock::new(inode))); in new() localVariable 90 result.0.lock().self_ref = Arc::downgrade(&result); in new() 92 return result; in new()
|
H A D | vm_dev.rs | 87 let result = Arc::new(LockedVmInode(SpinLock::new(inode))); in new() localVariable 88 result.0.lock().self_ref = Arc::downgrade(&result); in new() 90 return result; in new()
|
/DragonOS/kernel/crates/bitmap/src/ |
H A D | alloc_bitmap.rs | 124 let mut result = AllocBitmap::new(self.elements); in bitand() localVariable 126 result.data[i] = self.data[i] & rhs.data[i]; in bitand() 128 result in bitand()
|
/DragonOS/kernel/src/driver/net/e1000e/ |
H A D | e1000e_driver.rs | 104 let result = f(self.0.as_mut_slice()); in consume() localVariable 106 return result; in consume() 116 let result = f(buffer.as_mut_slice()); in consume() localVariable 120 return result; in consume() 134 let result = E1000EDriver { inner }; in new() localVariable 135 return result; in new() 205 let result = Arc::new(E1000EInterface { in new() localVariable 218 return result; in new()
|
/DragonOS/kernel/src/filesystem/devpts/ |
H A D | mod.rs | 235 let result = TtyDevice::new( in create_with_data() localVariable 241 let mut metadata = result.metadata()?; in create_with_data() 247 result.set_metadata(&metadata)?; in create_with_data() 251 .insert(name.to_string(), result.clone()); in create_with_data() 255 Ok(result) in create_with_data()
|
/DragonOS/kernel/src/filesystem/ramfs/ |
H A D | mod.rs | 140 let result: Arc<RamFS> = Arc::new(RamFS { in new() localVariable 146 let mut root_guard: SpinLockGuard<RamFSInode> = result.root_inode.0.lock(); in new() 147 root_guard.parent = Arc::downgrade(&result.root_inode); in new() 148 root_guard.self_ref = Arc::downgrade(&result.root_inode); in new() 149 root_guard.fs = Arc::downgrade(&result); in new() 153 return result; in new() 321 let result: Arc<LockedRamFSInode> = Arc::new(LockedRamFSInode(SpinLock::new(RamFSInode { in create_with_data() localVariable 348 result.0.lock().self_ref = Arc::downgrade(&result); in create_with_data() 351 inode.children.insert(name, result.clone()); in create_with_data() 353 return Ok(result); in create_with_data()
|