MCPcopy Create free account
hub / github.com/YatSenOS/YatSenOS-Tutorial-Volume-2 / kstack

Method kstack

src/0x03/crates/kernel/src/proc/vm/stack.rs:58–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 }
57
58 pub const fn kstack() -> Self {
59 Self {
60 range: Page::range(KSTACK_INIT_PAGE, KSTACK_INIT_TOP_PAGE),
61 usage: KSTACK_DEF_PAGE,
62 }
63 }
64
65 pub fn init(&mut self, mapper: MapperRef, alloc: FrameAllocatorRef) {
66 debug_assert!(self.usage == 0, "Stack is not empty.");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected