/DragonOS/kernel/src/driver/pci/ |
H A D | pci.rs | 120 let mut result = Vec::new(); in get_pci_device_structures_mut_by_vendor_id() localVariable 124 result.push(box_pci_device_structure); in get_pci_device_structures_mut_by_vendor_id() 127 result in get_pci_device_structures_mut_by_vendor_id() 148 let mut result = Vec::new(); in get_pci_device_structure_mut() localVariable 152 result.push(box_pci_device_structure); 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() 670 let result = pci_root_0().read_config(bus_device_function, STATUS_COMMAND_OFFSET.into()); in capabilities_offset() localVariable [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/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 | 18 let result = unsafe { mount(source, target, fstype, flags, data) }; in main() localVariable 25 let result = unsafe { mount(source, target, fstype, flags, data) }; in main() localVariable 26 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/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/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/kernel/src/driver/disk/ahci/ |
H A D | ahci_inode.rs | 62 let result = Arc::new(LockedAhciInode(SpinLock::new(inode))); in new() localVariable 63 result.0.lock().self_ref = Arc::downgrade(&result); in new() 65 return result; in new()
|
H A D | mod.rs | 42 let result = get_pci_device_structure_mut(list, AHCI_CLASS, AHCI_SUBCLASS); in ahci_device_search() localVariable 44 if result.is_empty() { in ahci_device_search() 48 return Ok(result); in ahci_device_search()
|
/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 | 134 let result: Arc<RamFS> = Arc::new(RamFS { in new() localVariable 140 let mut root_guard: SpinLockGuard<RamFSInode> = result.root_inode.0.lock(); in new() 141 root_guard.parent = Arc::downgrade(&result.root_inode); in new() 142 root_guard.self_ref = Arc::downgrade(&result.root_inode); in new() 143 root_guard.fs = Arc::downgrade(&result); in new() 147 return result; in new() 310 let result: Arc<LockedRamFSInode> = Arc::new(LockedRamFSInode(SpinLock::new(RamFSInode { in create_with_data() localVariable 337 result.0.lock().self_ref = Arc::downgrade(&result); in create_with_data() 340 inode.children.insert(name, result.clone()); in create_with_data() 342 return Ok(result); in create_with_data()
|
/DragonOS/kernel/src/driver/keyboard/ |
H A D | ps2_keyboard.rs | 98 let result = Arc::new(LockedPS2KeyBoardInode(RwLock::new(inode))); in new() localVariable 99 result.0.write().self_ref = Arc::downgrade(&result); in new() 101 return result; in new()
|
/DragonOS/kernel/src/driver/net/ |
H A D | loopback.rs | 81 let result = f(buffer.as_mut_slice()); in consume() localVariable 84 result in consume() 194 let mut result = phy::DeviceCapabilities::default(); in capabilities() localVariable 195 result.max_transmission_unit = 65535; in capabilities() 196 result.max_burst_size = Some(1); in capabilities() 197 result.medium = smoltcp::phy::Medium::Ethernet; in capabilities() 198 return result; in capabilities()
|