MCPcopy Create free account
hub / github.com/Ruddle/Fomos / with_mapper_framealloc

Function with_mapper_framealloc

bootloader/kernel/src/main.rs:154–163  ·  view source on GitHub ↗
(f: FUNC)

Source from the content-addressed store, hash-verified

152}
153
154pub fn with_mapper_framealloc<FUNC, R>(f: FUNC) -> R
155where
156 FUNC: FnOnce(&mut OffsetPageTable, &mut BootInfoFrameAllocator) -> R,
157{
158 let mut mapper = MAPPER.get().unwrap().lock();
159 let mut frame_allocator = FRAME_ALLOCATOR.get().unwrap().lock();
160 let mapper = &mut *mapper;
161 let frame_allocator = &mut *frame_allocator;
162 f(mapper, frame_allocator)
163}
164
165pub fn create_identity_virt_from_phys_n(pages: usize) -> Result<Page, MapToError<Size4KiB>> {
166 with_mapper_framealloc(|mapper, frame_allocator| {

Callers 2

kernel_mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected