Home
last modified time | relevance | path

Searched refs:res (Results 1 – 25 of 43) sorted by relevance

12

/DragonOS/kernel/src/arch/x86_64/driver/
H A Drtc.rs254 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 Dbitcount.h27 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 Dload_elf.rs96 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 Dcranelift.rs396 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/libs/
H A Dvec_cursor.rs59 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 Dspinlock.rs73 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 Drwlock.rs239 let res: bool = self in inner_try_write() localVariable
244 if res { in inner_try_write()
415 let res = self.inner.lock.compare_exchange( in try_upgrade() localVariable
423 if res.is_ok() { in try_upgrade()
/DragonOS/kernel/src/common/math/
H A Dpow.c12 int64_t res = 1; in pow() local
16 res *= x; in pow()
20 return res; in pow()
/DragonOS/kernel/src/bpf/helper/
H A Dmod.rs58 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/user/apps/test_utimensat/
H A Dmain.c10 int res = utimensat(AT_FDCWD, "/bin/about.elf", NULL, 0); in main() local
11 printf("utimensat res = %d\n", res); in main()
/DragonOS/tools/debugging/logmonitor/src/
H A Dapp.rs86 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 Dlru.rs58 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 Dhash_map.rs60 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 Darray_map.rs122 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 Dlog.rs101 let res = format!( in fmt() localVariable
105 return write!(f, "{}", res); in fmt()
/DragonOS/kernel/src/driver/video/
H A Dmod.rs52 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 Dmod.rs23 let res = match cmd { in bpf() localVariable
44 res in bpf()
/DragonOS/tools/debugging/logmonitor/src/backend/
H A Dmod.rs123 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/
H A Dlib.rs164 let res = unwinding::panic::begin_panic_with_hook::<Tracer>( in panic() localVariable
168 log::error!("panic unreachable: {:?}", res.0); in panic()
/DragonOS/kernel/src/driver/pci/
H A Draw_device.rs48 let res = Self { in from() localVariable
58 res.set_name(name); in from()
59 res in from()
/DragonOS/kernel/crates/rbpf/tests/
H A Dmisc.rs153 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/filesystem/vfs/
H A Dfile.rs502 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/driver/firmware/efi/
H A Dmemmap.rs85 let res = unsafe { *(vaddr.data() as *const Self::Item) }; in next() localVariable
86 return Some(res); in next()
/DragonOS/kernel/src/sched/
H A Dpelt.rs250 let res = *x + y; in add_positive() localVariable
251 *x = res.max(0); in add_positive()
/DragonOS/kernel/src/driver/acpi/
H A Dmod.rs93 let res = unsafe { acpi::AcpiTables::from_rsdp(AcpiHandlerImpl, table_paddr.data()) }; in map_tables() localVariable
94 match res { in map_tables()

12