Home
last modified time | relevance | path

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

12

/DragonOS-0.1.8/kernel/src/time/
Dtimekeep.rs6 pub type ktime_t = i64;
10 fn ktime_to_ns(kt: ktime_t) -> i64 { in ktime_to_ns() argument
11 return kt as i64; in ktime_to_ns()
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.rs43 pub tv_sec: i64,
44 pub tv_nsec: i64,
49 pub fn new(sec: i64, nsec: i64) -> TimeSpec { in new() argument
69 micros: i64,
77 pub fn from_micros<T: Into<i64>>(micros: T) -> Instant { in from_micros()
83 pub const fn from_micros_const(micros: i64) -> Instant { in from_micros_const()
88 pub fn from_millis<T: Into<i64>>(millis: T) -> Instant { in from_millis()
95 pub const fn from_millis_const(millis: i64) -> Instant { in from_millis_const()
102 pub fn from_secs<T: Into<i64>>(secs: T) -> Instant { in from_secs()
115 pub const fn millis(&self) -> i64 { in millis() argument
[all …]
Dtimer.rs27 const MAX_TIMEOUT: i64 = i64::MAX;
237 pub fn schedule_timeout(mut timeout: i64) -> Result<i64, SystemError> { in schedule_timeout() argument
249 timeout += TIMER_JIFFIES.load(Ordering::SeqCst) as i64; in schedule_timeout()
257 let time_remaining: i64 = timeout - TIMER_JIFFIES.load(Ordering::SeqCst) as i64; in schedule_timeout()
309 pub extern "C" fn rs_schedule_timeout(timeout: i64) -> i64 { in rs_schedule_timeout() argument
316 return e.to_posix_errno() as i64; in rs_schedule_timeout()
337 pub extern "C" fn rs_timer_get_first_expire() -> i64 { in rs_timer_get_first_expire()
339 Ok(v) => return v as i64, in rs_timer_get_first_expire()
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()
Dtimekeeping.rs49 xtime_remainder: i64,
51 raw_interval: i64,
55 ntp_error: i64,
122 timekeeper.xtime_remainder = (ntpinterval - timekeeper.xtime_interval) as i64; in timekeeper_setup_internals()
123 timekeeper.raw_interval = (timekeeper.xtime_interval >> clock_data.shift) as i64; in timekeeper_setup_internals()
181 _xtime.tv_nsec -= NSEC_PER_SEC as i64; in getnstimeofday()
224 let num = nsec % NSEC_PER_SEC as i64; in timekeeping_init()
225 nsec += num * NSEC_PER_SEC as i64; in timekeeping_init()
274 if usec % USEC_PER_SEC as i64 == 0 { in update_wall_time()
Dsleep.rs92 tv_sec: (usec / 1000000) as i64, in rs_usleep()
93 tv_nsec: ((usec % 1000000) * 1000) as i64, in rs_usleep()
/DragonOS-0.1.8/kernel/src/io/
Dmod.rs8 SeekSet(i64),
9 SeekCurrent(i64),
10 SeekEnd(i64),
/DragonOS-0.1.8/kernel/src/libs/
Datomic.rs8 pub fn atomic_read(ato: *const atomic_t) -> i64 { in atomic_read() argument
16 pub fn atomic_set(ato: *mut atomic_t, value: i64) { in atomic_set() argument
Dvec_cursor.rs132 let pos: i64; in seek()
138 pos = self.pos as i64 + offset; in seek()
142 pos = self.data.len() as i64 + offset; in seek()
149 if pos < 0 || pos > self.data.len() as i64 { in seek()
Delf.rs307 file.lseek(SeekFrom::SeekSet(offset_in_file as i64))?; in do_load_file()
414 file.lseek(SeekFrom::SeekSet(shoff as i64)) in parse_segments()
446 file.lseek(SeekFrom::SeekSet(phoff as i64)) in parse_segments()
/DragonOS-0.1.8/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.8/kernel/src/sched/
Dcfs.rs40 cpu_exec_proc_jiffies: i64,
44 queue: RBTree<i64, &'static mut process_control_block>,
94 pub fn min_vruntime(&self) -> Option<i64> { in min_vruntime() argument
134 fn update_cpu_exec_proc_jiffies(_priority: i64, cfs_queue: &mut CFSQueue) -> &mut CFSQueue { in update_cpu_exec_proc_jiffies() argument
Drt.rs104 const RR_TIMESLICE: i64 = 100;
105 const MAX_RT_PRIO: i64 = 100;
/DragonOS-0.1.8/kernel/src/mm/
Dc_adapter.rs111 return SystemError::ENOMEM.to_posix_errno() as i64 as usize; in do_kmalloc()
124 return SystemError::EINVAL.to_posix_errno() as i64 as usize; in kfree()
/DragonOS-0.1.8/kernel/src/filesystem/vfs/
Dsyscall.rs77 rdev: i64,
79 size: i64,
81 blcok_size: i64,
582 kstat.size = metadata.size as i64; in do_fstat()
585 kstat.blcok_size = metadata.blk_size as i64; in do_fstat()
598 kstat.rdev = metadata.raw_dev as i64; in do_fstat()
Dfile.rs196 let pos: i64; in lseek()
202 pos = self.offset as i64 + offset; in lseek()
Dmod.rs459 pub size: i64,
547 d_off: i64, // dir偏移量
/DragonOS-0.1.8/kernel/src/driver/keyboard/
Dps2_keyboard.rs106 len as i64, in read_at()
107 0 as *mut i64, in read_at()
/DragonOS-0.1.8/kernel/src/filesystem/procfs/
Dmod.rs55 pid: i64,
117 fn open_status(&self, pdata: &mut ProcfsFilePrivateData) -> Result<i64, SystemError> { in open_status() argument
119 let pid: &i64 = &self.fdata.pid; in open_status()
193 return Ok((pdata.len() * size_of::<u8>()) as i64); in open_status()
283 pub fn register_pid(&self, pid: i64) -> Result<(), SystemError> { in register_pid()
305 pub fn unregister_pid(&self, pid: i64) -> Result<(), SystemError> { in unregister_pid()
/DragonOS-0.1.8/kernel/src/filesystem/fat/
Dfs.rs112 self.metadata.size = f.size() as i64; in update_metadata()
115 self.metadata.size = d.size(&self.fs.upgrade().unwrap().clone()) as i64; in update_metadata()
381 cursor.seek(SeekFrom::SeekSet(blk_offset as i64))?; in get_fat_entry()
475 cursor.seek(SeekFrom::SeekSet(blk_offset as i64))?; in get_fat_entry_raw()
941 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in get_free_cluster()
989 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in get_free_cluster()
1021 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in get_free_cluster()
1068 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in set_entry()
1078 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in set_entry()
1101 cursor.seek(SeekFrom::SeekSet(in_block_offset as i64))?; in set_entry()
[all …]
Dentry.rs1100 cursor.seek(SeekFrom::SeekSet(blk_offset as i64))?; in flush()
1314 cursor.seek(SeekFrom::SeekSet(blk_offset as i64))?; in flush()
2377 cursor.seek(SeekFrom::SeekSet(blk_offset as i64))?; in get_raw_dir_entry()
2393 cursor.seek(SeekFrom::SeekSet(blk_offset as i64))?; in get_raw_dir_entry()
/DragonOS-0.1.8/docs/kernel/memory_management/
Dmmio.md143 num_free: i64,
/DragonOS-0.1.8/kernel/src/ipc/
Dpipe.rs145 metadata.size = inode.data.len() as i64; in metadata()
/DragonOS-0.1.8/kernel/src/driver/tty/
Dtty_device.rs271 metadata.size = TtyCore::STDIN_BUF_SIZE as i64; in new()
/DragonOS-0.1.8/kernel/src/filesystem/ramfs/
Dmod.rs203 metadata.size = inode.data.len() as i64; in metadata()

12