Home
last modified time | relevance | path

Searched refs:i64 (Results 1 – 25 of 34) sorted by relevance

12

/DragonOS-0.1.9/kernel/src/time/
Dtimekeep.rs6 pub type ktime_t = i64;
10 fn ktime_to_ns(kt: ktime_t) -> i64 { in ktime_to_ns() argument
48 let timestamp: ktime_t = day_count as i64 * 86_400_000_000_000i64 in ktime_get_real()
49 + (rtc_time.hour - 8) as i64 * 3_600_000_000_000i64 in ktime_get_real()
50 + rtc_time.minute as i64 * 60_000_000_000i64 in ktime_get_real()
51 + rtc_time.second as i64 * 1_000_000_000u64 as ktime_t; in ktime_get_real()
58 pub fn ktime_get_real_ns() -> i64 { in ktime_get_real_ns()
Dmod.rs49 pub tv_sec: i64,
50 pub tv_nsec: i64,
55 pub fn new(sec: i64, nsec: i64) -> TimeSpec { in new() argument
96 tv_sec: dur.total_micros() as i64 / 1000000, in from()
97 tv_nsec: (dur.total_micros() as i64 % 1000000) * 1000, in from()
120 micros: i64,
128 pub fn from_micros<T: Into<i64>>(micros: T) -> Instant { in from_micros()
134 pub const fn from_micros_const(micros: i64) -> Instant { in from_micros_const()
139 pub fn from_millis<T: Into<i64>>(millis: T) -> Instant { in from_millis()
146 pub const fn from_millis_const(millis: i64) -> Instant { in from_millis_const()
[all …]
Dtimekeeping.rs52 xtime_remainder: i64,
54 raw_interval: i64,
58 ntp_error: i64,
125 timekeeper.xtime_remainder = (ntpinterval - timekeeper.xtime_interval) as i64; in timekeeper_setup_internals()
126 timekeeper.raw_interval = (timekeeper.xtime_interval >> clock_data.shift) as i64; in timekeeper_setup_internals()
187 _xtime.tv_nsec -= NSEC_PER_SEC as i64; in getnstimeofday()
231 let num = nsec % NSEC_PER_SEC as i64; in timekeeping_init()
232 nsec += num * NSEC_PER_SEC as i64; in timekeeping_init()
246 pub fn update_wall_time(delta_us: i64) { in update_wall_time() argument
279 if usec % USEC_PER_SEC as i64 == 0 { in update_wall_time()
Dtimeconv.rs3 const SECS_PER_HOUR: i64 = 60 * 60;
5 const SECS_PER_DAY: i64 = SECS_PER_HOUR * 24;
7 const MON_OF_YDAY: [[i64; 13]; 2] = [
93 rem += offset as i64; in time_to_calendar()
122 days -= ((guess_year - year) * 365 + leaps_between(year, guess_year)) as i64; in time_to_calendar()
Dtimer.rs27 const MAX_TIMEOUT: i64 = i64::MAX;
262 pub fn schedule_timeout(mut timeout: i64) -> Result<i64, SystemError> { in schedule_timeout() argument
275 timeout += TIMER_JIFFIES.load(Ordering::SeqCst) as i64; in schedule_timeout()
286 let time_remaining: i64 = timeout - TIMER_JIFFIES.load(Ordering::SeqCst) as i64; in schedule_timeout()
321 pub fn update_timer_jiffies(add_jiffies: u64, time_us: i64) -> u64 { in update_timer_jiffies()
Dsleep.rs95 tv_sec: (usec / 1000000) as i64, in rs_usleep()
96 tv_nsec: ((usec % 1000000) * 1000) as i64, in rs_usleep()
/DragonOS-0.1.9/kernel/src/sched/
Dcompletion.rs10 const MAX_TIMEOUT: i64 = core::i64::MAX;
29 fn do_wait_for_common(&self, mut timeout: i64, interuptible: bool) -> Result<i64, SystemError> { in do_wait_for_common() argument
68 pub fn wait_for_completion_timeout(&self, timeout: i64) -> Result<i64, SystemError> { in wait_for_completion_timeout() argument
73 pub fn wait_for_completion(&self) -> Result<i64, SystemError> { in wait_for_completion() argument
78 pub fn wait_for_completion_interruptible(&self) -> Result<i64, SystemError> { in wait_for_completion_interruptible() argument
84 timeout: i64, in wait_for_completion_interruptible_timeout() argument
85 ) -> Result<i64, SystemError> { in wait_for_completion_interruptible_timeout() argument
Dcfs.rs48 cpu_exec_proc_jiffies: i64,
50 locked_queue: SpinLock<RBTree<i64, Arc<ProcessControlBlock>>>,
73 queue.insert(pcb.sched_info().virtual_runtime() as i64, pcb.clone()); in enqueue()
94 queue: &SpinLockGuard<RBTree<i64, Arc<ProcessControlBlock>>>, in min_vruntime() argument
95 ) -> Option<i64> { in min_vruntime() argument
97 return Some(queue.get_first().unwrap().1.sched_info().virtual_runtime() as i64); in min_vruntime()
105 queue: &SpinLockGuard<RBTree<i64, Arc<ProcessControlBlock>>>, in get_cfs_queue_size() argument
/DragonOS-0.1.9/kernel/src/driver/base/block/
Dmod.rs7 SeekSet(i64),
8 SeekCurrent(i64),
9 SeekEnd(i64),
/DragonOS-0.1.9/kernel/src/net/event_poll/
Dsyscall.rs49 let sec: i64 = timeout as i64 / 1000; in epoll_wait()
50 let nsec: i64 = 1000000 * (timeout as i64 % 1000); in epoll_wait()
/DragonOS-0.1.9/docs/kernel/sched/
Dkernel_timer.md58 pub fn schedule_timeout(mut timeout: i64) -> Result<i64, SystemError>
71 - Ok(i64):剩余需要休眠的时间 (单位:**jiffies**)
86 - Ok(i64):最早结束的定时器的结束时间 (单位:**jiffies**)
/DragonOS-0.1.9/kernel/src/libs/
Dvec_cursor.rs133 let pos: i64; in seek()
139 pos = self.pos as i64 + offset; in seek()
143 pos = self.data.len() as i64 + offset; in seek()
150 if pos < 0 || pos > self.data.len() as i64 { in seek()
Delf.rs341 file.lseek(SeekFrom::SeekSet(offset_in_file as i64))?; in do_load_file()
448 file.lseek(SeekFrom::SeekSet(shoff as i64)) in parse_segments()
480 file.lseek(SeekFrom::SeekSet(phoff as i64)) in parse_segments()
/DragonOS-0.1.9/kernel/src/arch/x86_64/driver/
Dtsc.rs77 } else if (Self::cpu_khz() as i64 - Self::tsc_khz() as i64).abs() * 10 in determine_cpu_tsc_frequency()
78 > Self::cpu_khz() as i64 in determine_cpu_tsc_frequency()
/DragonOS-0.1.9/kernel/src/process/
Dexit.rs55 mut pid: i64, in kernel_wait4() argument
61 if pid == i64::MIN { in kernel_wait4()
77 pid = ProcessManager::current_pcb().pid().data() as i64; in kernel_wait4()
/DragonOS-0.1.9/kernel/src/mm/
Dc_adapter.rs102 return SystemError::ENOMEM.to_posix_errno() as i64 as usize; in do_kmalloc()
115 return SystemError::EINVAL.to_posix_errno() as i64 as usize; in kfree()
/DragonOS-0.1.9/kernel/src/filesystem/fat/
Dfs.rs120 self.metadata.size = f.size() as i64; in update_metadata()
123 self.metadata.size = d.size(&self.fs.upgrade().unwrap().clone()) as i64; in update_metadata()
391 cursor.seek(SeekFrom::SeekSet(blk_offset as i64))?; in get_fat_entry()
485 cursor.seek(SeekFrom::SeekSet(blk_offset as i64))?; in get_fat_entry_raw()
952 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in get_free_cluster()
1000 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in get_free_cluster()
1032 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in get_free_cluster()
1079 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in set_entry()
1089 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in set_entry()
1112 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in set_entry()
[all …]
/DragonOS-0.1.9/kernel/src/filesystem/vfs/
Dsyscall.rs104 rdev: i64,
106 size: i64,
108 blcok_size: i64,
816 kstat.size = metadata.size as i64; in do_fstat()
819 kstat.blcok_size = metadata.blk_size as i64; in do_fstat()
832 kstat.rdev = metadata.raw_dev.data() as i64; in do_fstat()
Dfile.rs292 let pos: i64; in lseek()
298 pos = self.offset as i64 + offset; in lseek()
389 dirent.d_off += dirent.d_reclen as i64; in readdir()
Dmod.rs514 pub size: i64,
603 d_off: i64, // dir偏移量
/DragonOS-0.1.9/kernel/src/driver/video/fbdev/
Dvesafb.rs348 let pos = pos as i64; in fb_read()
349 let size = size as i64; in fb_read()
351 let len = core::cmp::min(size - pos, buf.len() as i64) as usize; in fb_read()
369 let pos = pos as i64; in fb_write()
370 let size = size as i64; in fb_write()
372 let len = core::cmp::min(size - pos, buf.len() as i64) as usize; in fb_write()
/DragonOS-0.1.9/kernel/src/filesystem/procfs/
Dmod.rs134 fn open_status(&self, pdata: &mut ProcfsFilePrivateData) -> Result<i64, SystemError> { in open_status() argument
217 return Ok((pdata.len() * size_of::<u8>()) as i64); in open_status()
221 fn open_meminfo(&self, pdata: &mut ProcfsFilePrivateData) -> Result<i64, SystemError> { in open_meminfo() argument
243 return Ok((data.len() * size_of::<u8>()) as i64); in open_meminfo()
/DragonOS-0.1.9/kernel/src/ipc/
Dpipe.rs117 size: PIPE_BUFF_SIZE as i64, in new()
269 metadata.size = inode.data.len() as i64; in metadata()
/DragonOS-0.1.9/docs/kernel/memory_management/
Dmmio.md143 num_free: i64,
/DragonOS-0.1.9/kernel/src/exception/
Dirqdesc.rs131 pub fn threads_active(&self) -> i64 { in threads_active() argument
136 pub fn inc_threads_active(&self) -> i64 { in inc_threads_active() argument
142 pub fn dec_threads_active(&self) -> i64 { in dec_threads_active() argument

12