Home
last modified time | relevance | path

Searched refs:shift (Results 1 – 12 of 12) sorted by relevance

/DragonOS/kernel/src/time/
H A Dtimekeeping.rs47 shift: i32, field
74 shift: Default::default(), in new()
126 let mut temp = NTP_INTERVAL_LENGTH << clock_data.shift; in timekeeper_setup_internals()
135 timekeeper.raw_interval = (timekeeper.xtime_interval >> clock_data.shift) as i64; in timekeeper_setup_internals()
137 timekeeper.shift = clock_data.shift as i32; in timekeeper_setup_internals()
140 timekeeper.ntp_error_shift = (NTP_SCALE_SHIFT - clock_data.shift) as i32; in timekeeper_setup_internals()
156 timekeeper.shift as u32, in timekeeping_get_ns()
254 pub fn logarithmic_accumulation(&self, offset: u64, shift: i32) -> u64 { in logarithmic_accumulation()
258 let nsecps = (NSEC_PER_SEC as u64) << timekeeper.shift; in logarithmic_accumulation()
262 if offset < timekeeper.cycle_interval.data() << shift { in logarithmic_accumulation()
[all …]
H A Dclocksource.rs284 cs_data_guard.shift, in clocksource_max_deferment()
337 let (mult, shift) = in clocksource_update_freq_scale()
340 cs_data.set_shift(shift); in clocksource_update_freq_scale()
365 cs_data.set_shift(cs_data.shift - 1); in clocksource_update_freq_scale()
671 pub shift: u32, field
693 shift: u32, in new()
704 shift, in new()
728 pub fn set_shift(&mut self, shift: u32) { in set_shift()
729 self.shift = shift; in set_shift()
755 pub fn clocksource_cyc2ns(cycles: CycleNum, mult: u32, shift: u32) -> u64 { in clocksource_cyc2ns()
[all …]
H A Djiffies.rs57 d.set_shift(data.shift); in update_clocksource_data()
79 shift: JIFFIES_SHIFT, in new()
/DragonOS/kernel/src/libs/
H A Dkeyboard_parser.rs329 let shift = scancode_status.shift_l || scancode_status.shift_r; in handle_type3() localVariable
330 if shift { in handle_type3()
345 ch = Self::to_ctrl(ch, shift); in handle_type3()
353 fn to_ctrl(ch: u8, shift: bool) -> u8 { in to_ctrl()
357 if shift { in to_ctrl()
/DragonOS/kernel/crates/bitmap/src/
H A Dtraits.rs23 fn make_mask(shift: usize) -> Self; in make_mask()
177 fn make_mask(shift: usize) -> Self {
178 if shift == <$target>::BITS as usize {
181 (1 << shift) - 1
/DragonOS/kernel/src/mm/
H A Dmmio_buddy.rs84 for shift in (PAGE_4K_SHIFT..=PAGE_1G_SHIFT).rev() { in new()
85 if remain_size & (1 << shift) != 0 { in new()
86 let ok = pool.give_back_block(vaddr_base, shift as u32).is_ok(); in new()
88 vaddr_base += 1 << shift; in new()
89 remain_size -= 1 << shift; in new()
H A Dpage.rs528 let shift = self.level * Arch::PAGE_ENTRY_SHIFT + Arch::PAGE_SHIFT; in entry_base() localVariable
529 return Some(self.base.add(i << shift)); in entry_base()
583 let shift = self.level * Arch::PAGE_ENTRY_SHIFT + Arch::PAGE_SHIFT; in index_of() localVariable
585 let mask = (MMArch::PAGE_ENTRY_NUM << shift) - 1; in index_of()
589 return Some((addr.data() >> shift) & MMArch::PAGE_ENTRY_MASK); in index_of()
/DragonOS/kernel/src/driver/video/fbdev/base/
H A Dmod.rs156 let mut shift; in fast_imageblit() localVariable
162 shift = 8; in fast_imageblit()
212 shift -= ppw; in fast_imageblit()
213 dst1.write(color_tab[(image.data[src] as usize >> shift) & bitmask]); in fast_imageblit()
214 if shift == 0 { in fast_imageblit()
215 shift = 8; in fast_imageblit()
/DragonOS/kernel/src/driver/clocksource/
H A Dacpi_pm.rs87 shift: 0, in new()
126 d.set_shift(data.shift); in update_clocksource_data()
/DragonOS/docs/community/code_contribution/
H A Dc-coding-style.md13 &emsp;&emsp;当您在编码时,经常性的按下`Ctrl+shift+I`或您设置的代码格式化快捷键,能帮助您始终保持良好的代码格式。
/DragonOS/kernel/src/sched/
H A Dmod.rs222 let mut shift = Self::WMULT_SHIFT; in calculate_delta() localVariable
230 shift -= fs; in calculate_delta()
245 shift -= fs; in calculate_delta()
251 return ((delta_exec as u128 * fact as u128) >> shift) as u64; in calculate_delta()
/DragonOS/kernel/src/libs/futex/
H A Dfutex.rs554 let shift = (31 - index) as u8; in futex_atomic_op_inuser() localVariable
555 return (value << shift) >> shift; in futex_atomic_op_inuser()