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

Method activateProgramPage

lab8/src/6/src/kernel/program.cpp:345–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

vaddr2paddrMethod · 0.45

Tested by

no test coverage detected