MCPcopy Create free account
hub / github.com/YatSenOS/YatSenOS-Tutorial-Volume-1 / activateProgramPage

Method activateProgramPage

lab8/src/5/src/kernel/program.cpp:341–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339}
340
341void ProgramManager::activateProgramPage(PCB *program)
342{
343 int paddr = PAGE_DIRECTORY;
344
345 if (program->pageDirectoryAddress)
346 {
347 tss.esp0 = (int)program + PAGE_SIZE;
348 paddr = memoryManager.vaddr2paddr(program->pageDirectoryAddress);
349 }
350
351 asm_update_cr3(paddr);
352}
353
354int ProgramManager::fork()
355{

Callers

nothing calls this directly

Calls 1

vaddr2paddrMethod · 0.45

Tested by

no test coverage detected