/DragonOS/kernel/src/arch/x86_64/driver/ |
H A D | rtc.rs | 254 let mut res = RtcTime::default(); in read_time() localVariable 257 res.year = dev.read_cmos(CMOSTimeSelector::Year as u8) as i32; in read_time() 258 res.month = dev.read_cmos(CMOSTimeSelector::Month as u8) as i32; in read_time() 259 res.mday = dev.read_cmos(CMOSTimeSelector::Day as u8) as i32; in read_time() 260 res.hour = dev.read_cmos(CMOSTimeSelector::Hour as u8) as i32; in read_time() 261 res.minute = dev.read_cmos(CMOSTimeSelector::Minute as u8) as i32; in read_time() 262 res.second = dev.read_cmos(CMOSTimeSelector::Second as u8) as i32; in read_time() 264 if res.second == dev.read_cmos(CMOSTimeSelector::Second as u8) as i32 { in read_time() 276 res.second = (res.second & 0xf) + (res.second >> 4) * 10; in read_time() 277 res.minute = (res.minute & 0xf) + (res.minute >> 4) * 10; in read_time() [all …]
|
/DragonOS/kernel/src/arch/x86_64/math/ |
H A D | bitcount.h | 27 int res = 0; in __clzl() local 32 : "=m"(res) in __clzl() 35 return res; in __clzl() 46 int res = 0; in __clzll() local 51 : "=m"(res) in __clzll() 54 return res; in __clzll()
|
/DragonOS/kernel/crates/rbpf/examples/ |
H A D | load_elf.rs | 96 let res = vm.execute_program(packet1).unwrap(); in main() localVariable 98 assert_eq!(res, 0xffffffff); in main() 104 let res = unsafe { vm.execute_program_jit(packet2).unwrap() }; in main() localVariable 106 assert_eq!(res, 0); in main() 111 let res = vm.execute_program(packet2).unwrap(); in main() localVariable 112 println!("Packet #2, program returned: {:?} ({:#x})", res, res); in main() 113 assert_eq!(res, 0); in main()
|
/DragonOS/kernel/crates/rbpf/src/ |
H A D | cranelift.rs | 396 let res = bcx.ins().iadd(src, imm); in translate_program() localVariable 397 self.set_dst32(bcx, &insn, res); in translate_program() 403 let res = bcx.ins().iadd(lhs, rhs); in translate_program() localVariable 404 self.set_dst32(bcx, &insn, res); in translate_program() 410 let res = bcx.ins().isub(src, imm); in translate_program() localVariable 411 self.set_dst32(bcx, &insn, res); in translate_program() 417 let res = bcx.ins().isub(lhs, rhs); in translate_program() localVariable 418 self.set_dst32(bcx, &insn, res); in translate_program() 424 let res = bcx.ins().imul(src, imm); in translate_program() localVariable 425 self.set_dst32(bcx, &insn, res); in translate_program() [all …]
|
/DragonOS/kernel/src/common/math/ |
H A D | pow.c | 12 int64_t res = 1; in pow() local 16 res *= x; in pow() 20 return res; in pow()
|
/DragonOS/kernel/src/libs/ |
H A D | vec_cursor.rs | 59 let mut res = 0u16; in read_u16() localVariable 60 res |= (self.data[self.pos] as u16) & 0xff; in read_u16() 62 res |= ((self.data[self.pos] as u16) & 0xff) << 8; in read_u16() 65 return Ok(res); in read_u16() 73 let mut res = 0u32; in read_u32() localVariable 75 res |= ((self.data[self.pos] as u32) & 0xff) << (8 * i); in read_u32() 79 return Ok(res); in read_u32() 87 let mut res = 0u64; in read_u64() localVariable 89 res |= ((self.data[self.pos] as u64) & 0xff) << (8 * i); in read_u64() 93 return Ok(res); in read_u64()
|
H A D | spinlock.rs | 73 let res = self.try_lock(); in lock() localVariable 74 if let Ok(res) = res { in lock() 75 return res; in lock() 121 let res = self in inner_try_lock() localVariable 125 return res; in inner_try_lock()
|
H A D | rwlock.rs | 240 let res: bool = self in inner_try_write() localVariable 245 if res { in inner_try_write() 416 let res = self.inner.lock.compare_exchange( in try_upgrade() localVariable 424 if res.is_ok() { in try_upgrade()
|
/DragonOS/user/apps/test_utimensat/ |
H A D | main.c | 10 int res = utimensat(AT_FDCWD, "/bin/about.elf", NULL, 0); in main() local 11 printf("utimensat res = %d\n", res); in main()
|
/DragonOS/kernel/src/bpf/helper/ |
H A D | mod.rs | 58 let res = perf_event_output(ctx, &map, flags, data); in raw_perf_event_output() localVariable 61 match res { in raw_perf_event_output() 102 let res = bpf_probe_read(dst, src); in raw_bpf_probe_read() localVariable 103 match res { in raw_bpf_probe_read() 130 let res = map_update_elem(&map, key, value, flags); in raw_map_update_elem() localVariable 132 match res { in raw_map_update_elem() 151 let res = map_delete_elem(&map, key); in raw_map_delete_elem() localVariable 153 match res { in raw_map_delete_elem() 189 let res = map_for_each_elem(&map, cb, ctx as _, flags); in raw_map_for_each_elem() localVariable 191 match res { in raw_map_for_each_elem() [all …]
|
/DragonOS/tools/debugging/logmonitor/src/ |
H A D | app.rs | 86 if let Some(res) = self.counter.checked_add(1) { in increment_counter() 87 self.counter = res; in increment_counter() 92 if let Some(res) = self.counter.checked_sub(1) { in decrement_counter() 93 self.counter = res; in decrement_counter()
|
/DragonOS/kernel/src/bpf/map/ |
H A D | lru.rs | 58 let res = cb(key, value, ctx); in for_each_elem() localVariable 60 if res != 0 { in for_each_elem() 86 let res = iter.next(); in get_next_key() localVariable 87 match res { in get_next_key()
|
H A D | hash_map.rs | 60 let res = cb(key, value, ctx); in for_each_elem() localVariable 62 if res != 0 { in for_each_elem() 88 let res = iter.next(); in get_next_key() localVariable 89 match res { in get_next_key()
|
H A D | array_map.rs | 122 let res = cb(&key, value, ctx); in for_each_elem() localVariable 124 if res != 0 { in for_each_elem() 270 let res = cb(&key, value, ctx); in for_each_elem() localVariable 271 if res != 0 { in for_each_elem()
|
/DragonOS/kernel/src/filesystem/procfs/ |
H A D | log.rs | 101 let res = format!( in fmt() localVariable 105 return write!(f, "{}", res); in fmt()
|
/DragonOS/kernel/src/driver/video/ |
H A D | mod.rs | 52 let res = self.set_run(); in run_video_refresh() localVariable 55 if res { in run_video_refresh() 61 return res; in run_video_refresh() 71 let res = self in set_run() localVariable 74 return res.is_ok(); in set_run()
|
/DragonOS/kernel/src/bpf/ |
H A D | mod.rs | 23 let res = match cmd { in bpf() localVariable 44 res in bpf()
|
/DragonOS/tools/debugging/logmonitor/src/backend/ |
H A D | mod.rs | 123 let res = loader::KernelLoader::load(&self.command_line_args.kernel) in load_kernel() localVariable 125 self.shared_data.lock().unwrap().kernel_metadata = Some(res); in load_kernel()
|
/DragonOS/kernel/src/driver/pci/ |
H A D | raw_device.rs | 48 let res = Self { in from() localVariable 58 res.set_name(name); in from() 59 res in from()
|
/DragonOS/kernel/crates/rbpf/tests/ |
H A D | misc.rs | 153 let res = vm.execute_program(packet).unwrap(); in test_vm_block_port() localVariable 155 assert_eq!(res, 0xffffffff); in test_vm_block_port() 221 let res = vm.execute_program_jit(packet).unwrap(); in test_jit_block_port() localVariable 223 assert_eq!(res, 0xffffffff); in test_jit_block_port()
|
/DragonOS/kernel/src/driver/firmware/efi/ |
H A D | memmap.rs | 85 let res = unsafe { *(vaddr.data() as *const Self::Item) }; in next() localVariable 86 return Some(res); in next()
|
/DragonOS/kernel/src/filesystem/vfs/ |
H A D | file.rs | 502 let res = Self { in try_clone() localVariable 514 .open(res.private_data.lock(), &res.mode()) in try_clone() 520 return Some(res); in try_clone() 678 let mut res = FileDescriptorVec::new(); in clone() localVariable 682 res.fds[i] = Some(Arc::new(file)); in clone() 686 return res; in clone()
|
/DragonOS/kernel/src/sched/ |
H A D | pelt.rs | 250 let res = *x + y; in add_positive() localVariable 251 *x = res.max(0); in add_positive()
|
/DragonOS/kernel/src/driver/acpi/ |
H A D | mod.rs | 93 let res = unsafe { acpi::AcpiTables::from_rsdp(AcpiHandlerImpl, table_paddr.data()) }; in map_tables() localVariable 94 match res { in map_tables()
|
/DragonOS/kernel/src/net/event_poll/ |
H A D | mod.rs | 528 let mut res: usize = 0; in ep_send_events() localVariable 534 if res >= max_events as usize { in ep_send_events() 571 user_event[res] = event; in ep_send_events() 573 res += 1; in ep_send_events() 590 Ok(res) in ep_send_events()
|