Home
last modified time | relevance | path

Searched refs:num (Results 1 – 19 of 19) sorted by relevance

/DragonOS/kernel/src/libs/
H A Dprintk.c25 static char *write_num(char *str, ul num, int base, int field_width, int precision, int flags);
27 static char *write_float_point_num(char *str, double num, int field_width, int precision, int flags…
383 static char *write_num(char *str, ul num, int base, int field_width, int precision, int flags) in write_num() argument
415 int64_t signed_num = (int64_t)num; in write_num()
419 num = -signed_num; in write_num()
422 num = signed_num; in write_num()
442 if (num == 0) in write_num()
446 num = ABS(num); in write_num()
448 while (num > 0) in write_num()
450 tmp_num[js_num++] = digits[num % base]; // 注意这里,输出的数字,是小端对齐的。低位存低位 in write_num()
[all …]
/DragonOS/kernel/crates/system_error/
H A DCargo.toml9 num-traits = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/num-traits.git", rev="…
10 num-derive = "0.3"
/DragonOS/kernel/src/driver/video/fbdev/base/
H A Drender_helper.rs59 fn reverse(num: u32, byte_per_pixel: u32) -> u32 { in reverse()
62 let mut num = num; in reverse() localVariable
64 ans |= mask & num; in reverse()
66 num >>= 8; in reverse()
68 ans |= mask & num; in reverse()
/DragonOS/kernel/
H A DCargo.toml52 num = { version = "=0.4.0", default-features = false }
53 num-derive = "=0.3"
54 num-traits = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/num-traits.git", rev="…
/DragonOS/kernel/src/ipc/
H A Dpipe.rs234 let mut num = inode.valid_cnt as usize; in read_at() localVariable
242 num = len; in read_at()
249 buf[(PIPE_BUFF_SIZE - start)..num].copy_from_slice(&inode.data[0..end]); in read_at()
251 buf[0..num].copy_from_slice(&inode.data[start..end]); in read_at()
255 inode.read_pos = (inode.read_pos + num as i32) % PIPE_BUFF_SIZE as i32; in read_at()
256 inode.valid_cnt -= num as i32; in read_at()
273 return Ok(num); in read_at()
H A Dshm.rs22 use num::ToPrimitive;
/DragonOS/kernel/src/namespaces/
H A Ducount.rs107 let num = iter.ucount[uc_type].fetch_add(1, core::sync::atomic::Ordering::SeqCst); in inc_ucounts() localVariable
110 if num > iter.ns.ucount_max[uc_type] { in inc_ucounts()
140 let num = iter.ucount[uc_type].fetch_sub(1, core::sync::atomic::Ordering::SeqCst); in dec_ucount() localVariable
141 if num == 0 { in dec_ucount()
/DragonOS/docs/kernel/core_api/
H A Dcasting.md5 - 数值类型转换 (使用`num-traits`库)
15   您可以使用`num-traits`库提供的宏,实现枚举类型和整数类型之间的转换。
/DragonOS/kernel/src/driver/tty/
H A Dtty_core.rs675 pub fn from_u8(num: u8) -> EchoOperation { in from_u8()
676 match num { in from_u8()
681 _ => Self::Undefined(num), in from_u8()
691 EchoOperation::Undefined(num) => num, in to_u8()
/DragonOS/kernel/src/
H A Dlib.rs79 extern crate num;
/DragonOS/kernel/src/filesystem/fat/
H A Dentry.rs2010 if let Some(num) = num_suffix {
2011 self.suffix_bitmask |= 1 << num;
2026 Result<u16, core::num::ParseIntError>,
2033 if let Some(num) = num_suffix {
2034 self.checksum_bitmask |= 1 << num;
2069 self.checksum = (core::num::Wrapping(self.checksum) + core::num::Wrapping(1)).0; in next_iteration()
2081 fn build_prefixed_name(&self, num: u32, with_checksum: bool) -> [u8; 11] { in build_prefixed_name()
2095 buf[prefix_len + 1] = char::from_digit(num, 10).unwrap() as u8;
/DragonOS/kernel/src/driver/tty/tty_ldisc/
H A Dntty.rs716 fn echo_erase_tab(&mut self, mut num: u8, after_tab: bool) { in echo_erase_tab()
720 num &= 7; in echo_erase_tab()
723 num |= 0x80; in echo_erase_tab()
726 self.add_echo_byte(num); in echo_erase_tab()
1777 let num = match ret { in write() localVariable
1778 Ok(num) => num, in write()
1788 offset += num; in write()
1789 nr -= num; in write()
/DragonOS/kernel/src/bpf/map/
H A Dlru.rs7 use core::num::NonZero;
/DragonOS/kernel/src/mm/
H A Dmemblock.rs382 let num = inner.initial_memory_regions_num as isize; in set_or_clear_flags() localVariable
383 self.do_merge_blocks(&mut inner, 0, num); in set_or_clear_flags()
/DragonOS/kernel/src/libs/lib_ui/
H A Dtextui.rs136 pub fn new(num: i32) -> Self { in new()
137 LineId(num) in new()
192 pub fn new(num: i32) -> Self { in new()
193 LineIndex(num) in new()
/DragonOS/kernel/src/arch/x86_64/kvm/vmx/
H A Dvmcs.rs446 fn from(num: i32) -> Self { in from()
447 match num { in from()
510 _ => panic!("Invalid VmxExitReason number: {}", num), in from()
/DragonOS/kernel/src/syscall/
H A Duser_access.rs5 num::NonZero,
/DragonOS/kernel/src/driver/tty/virtual_terminal/
H A Dvirtual_console.rs148 pub fn new(num: usize) -> Self { in new()
205 vc_index: num, in new()
/DragonOS/kernel/src/driver/pci/
H A Dpci.rs93 pub fn num(&self) -> usize { in num() method
1059 PCI_DEVICE_LINKEDLIST.num() in pci_init()