MCPcopy Create free account
hub / github.com/asterinas/vostd / parse_u32

Function parse_u32

ostd/src/task/kernel_stack.rs:102–112  ·  view source on GitHub ↗
(input: &str)

Source from the content-addressed store, hash-verified

100 let mapped_start = new_kvirt_area.range().start + 2 * PAGE_SIZE;
101 let mapped_end = mapped_start + KERNEL_STACK_SIZE;
102 Ok(Self {
103 kvirt_area: new_kvirt_area,
104 tlb_coherent: AtomicCpuSet::new(CpuSet::new_empty()),
105 end_vaddr: mapped_end,
106 has_guard_page: true,
107 })
108 }
109
110 /// Flushes the TLB for the current CPU if necessary.
111 pub(super) fn flush_tlb(&self, irq_guard: &DisabledLocalIrqGuard) {
112 let cur_cpu = irq_guard.current_cpu();
113 if !self.tlb_coherent.contains(cur_cpu, Ordering::Relaxed) {
114 tlb_flush_addr_range(&self.kvirt_area.range());
115 self.tlb_coherent.add(cur_cpu, Ordering::Relaxed);

Callers 1

parse_u32_or_defaultFunction · 0.85

Calls 2

as_bytesMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected