/DragonOS/kernel/crates/rbpf/src/ |
H A D | helpers.rs | 259 pub fn rand(min: u64, max: u64, unused3: u64, unused4: u64, unused5: u64) -> u64 { in rand() 261 if min < max { in rand() 262 n = n % (max + 1 - min) + min; in rand()
|
/DragonOS/user/apps/http_server/ |
H A D | main.c | 16 #define min(a, b) ((a) < (b) ? (a) : (b)) macro 96 int to_read = min(1048576, remaining); in send_file() 103 int wsize = write(sockfd, p, min(readSize, MAX_RESPONSE_SIZE)); in send_file()
|
/DragonOS/kernel/src/arch/x86_64/driver/ |
H A D | tsc.rs | 8 cmp::{max, min}, 142 tsc_pit_min = min(tsc_pit_min, tsc_pit_khz); in calibrate_cpu_by_pit_hpet_ptimer() 163 tsc_ref_min = min(tsc_ref_min, tsc2); in calibrate_cpu_by_pit_hpet_ptimer() 274 tscmin = min(tscmin, delta); in pit_calibrate_tsc()
|
/DragonOS/kernel/src/common/ |
H A D | glib.h | 34 #define min(x, y) ((x < y) ? (x) : (y)) macro
|
/DragonOS/kernel/src/filesystem/procfs/ |
H A D | kmsg.rs | 71 let len = self.data.len().min(buf.len()); in read_all() 90 let len = data_level.len().min(buf.len()); in read_level()
|
H A D | mod.rs | 277 let start = pdata.data.len().min(offset); in proc_read() 278 let end = pdata.data.len().min(offset + len); in proc_read() 531 let start = inode.data.len().min(offset); in read_at() 532 let end = inode.data.len().min(offset + len); in read_at()
|
/DragonOS/kernel/src/init/ |
H A D | boot.rs | 1 use core::cmp::min; 92 let len = min(avail as usize, data.len()); in boot_cmdline_append()
|
H A D | cmdline.rs | 275 let len = value.len().min(KernelCmdlineEarlyKV::VALUE_MAX_LEN); in early_init() 293 let len = v.default.len().min(KernelCmdlineEarlyKV::VALUE_MAX_LEN); in early_init()
|
/DragonOS/kernel/src/arch/x86_64/mm/ |
H A D | bump.rs | 39 let new_end = core::cmp::min(offset_end, area_end); in arch_remain_areas()
|
/DragonOS/kernel/src/time/ |
H A D | mod.rs | 180 pub fn mktime64(year0: u32, mon0: u32, day: u32, hour: u32, min: u32, sec: u32) -> Self { in mktime64() 185 let min: u64 = min.into(); in mktime64() localVariable 200 * 60 + min)/* now have minutes */ in mktime64()
|
/DragonOS/kernel/src/driver/tty/ |
H A D | kthread.rs | 43 let to_dequeue = core::cmp::min(KEYBUF.len(), TO_DEQUEUE_MAX); in tty_refresh_thread()
|
/DragonOS/kernel/crates/ida/src/ |
H A D | lib.rs | 10 use core::cmp::min; 98 self.do_find_first_free_index(self.min_id, min(self.current_id, self.max_id)) in alloc()
|
/DragonOS/kernel/src/net/socket/ |
H A D | unix.rs | 66 let len = core::cmp::min(buf.len(), buffer.len()); in read() 177 let len = core::cmp::min(buf.len(), buffer.len()); in read()
|
/DragonOS/kernel/src/sched/ |
H A D | cputime.rs | 46 let delta = self.tick_delta.min(max); in irqtime_tick_accounted()
|
/DragonOS/kernel/src/syscall/ |
H A D | misc.rs | 80 let step = cmp::min(remain_len, 4); in get_random()
|
/DragonOS/kernel/src/mm/ |
H A D | fault.rs | 3 cmp::{max, min}, 551 pte_pgoff - min(vm_pgoff, pte_pgoff), in do_fault_around() 558 let to_pte = min( in do_fault_around() 560 min( in do_fault_around()
|
H A D | memblock.rs | 146 base = core::cmp::min(range_end, end); in do_add_block() 196 end_index = core::cmp::min(end_index, inner.initial_memory_regions_num as isize - 1); in do_merge_blocks()
|
/DragonOS/kernel/src/libs/ |
H A D | elf.rs | 2 cmp::{max, min}, 335 let buf_size = min(size, Self::FILE_READ_BUF_SIZE); in do_load_file() 343 let read_size = min(remain, buf_size); in do_load_file() 607 min_address = min( in load() 645 let nbyte = min(CurrentElfArch::ELF_PAGE_SIZE - nbyte, elf_brk - elf_bss); in load()
|
/DragonOS/kernel/src/filesystem/fat/ |
H A D | entry.rs | 2 use core::{cmp::min, intrinsics::unlikely}; 106 let to_read_size: usize = min(buf.len(), bytes_remain as usize); in read() 123 let end_len: usize = min( in read() 125 min( in read() 191 let end_len = min( in write() 245 let extra_bytes = min((offset + len) - self.size(), MAX_FILE_SIZE - self.size()); in ensure_len() 1994 let prefix_len = min(self.basename_len, 6) as usize; 2016 let prefix_len = min(self.basename_len, 2) as usize; 2084 let prefix_len: usize = min(self.basename_len as usize, 2); 2089 let prefix_len = min(self.basename_len as usize, 6);
|
/DragonOS/kernel/src/driver/video/fbdev/ |
H A D | vesafb.rs | 349 let len = core::cmp::min(size - pos, buf.len() as i64) as usize; in fb_read() 370 let len = core::cmp::min(size - pos, buf.len() as i64) as usize; in fb_write() 463 (0, (data.width - ((-data.sx) as u32)).min(var.xres)) in fb_copyarea() 474 (0, (data.height - ((-data.sy) as u32).min(var.yres))) in fb_copyarea() 486 (0, (data.width - ((-data.dx) as u32)).min(var.xres)) in fb_copyarea() 497 (0, (data.height - ((-data.dy) as u32).min(var.yres))) in fb_copyarea()
|
/DragonOS/user/apps/test_bind/ |
H A D | main.c | 13 #define min(a, b) ((a) < (b) ? (a) : (b)) macro
|
/DragonOS/kernel/src/filesystem/kernfs/ |
H A D | mod.rs | 1 use core::{cmp::min, fmt::Debug, intrinsics::unlikely}; 330 let len = min(len, buf.len()); in read_at() 331 let len = min( in read_at()
|
/DragonOS/kernel/src/mm/allocator/ |
H A D | buddy.rs | 13 use core::cmp::min; 570 base = min(base, buddy_addr); in buddy_free()
|
/DragonOS/kernel/src/driver/tty/tty_ldisc/ |
H A D | ntty.rs | 206 n = count.min(room); in receive_buf_common() 247 let look_ahead = self.lookahead_count.min(count); in receive_buf() 286 let mut n = count.min(NTTY_BUFSIZE - head); in receive_buf_real_raw() 296 n = count.min(NTTY_BUFSIZE - head); in receive_buf_real_raw() 1007 let mut n = (*nr).min(canon_head - self.read_tail); in canon_copy_from_read_buf() 1128 let mut n = (NTTY_BUFSIZE - tail).min(head - self.read_tail); in copy_from_read_buf() 1129 n = n.min(*nr); in copy_from_read_buf()
|
/DragonOS/kernel/src/exception/ |
H A D | sysfs.rs | 159 let len = core::cmp::min(name.len() + 1, buf.len()); in show()
|