diff options
author | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-04 20:47:46 +0200 |
---|---|---|
committer | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-04 20:47:46 +0200 |
commit | a9bb8d1be024730fc4687aab78a8e5cb54b4f05e (patch) | |
tree | e10940a39e9864430b584cd84700b8d49aebd62a /src/kernel/mem/paging.cpp | |
parent | 35857cb36ae65779a7cab773040c0fc91387a989 (diff) | |
download | TCE-a9bb8d1be024730fc4687aab78a8e5cb54b4f05e.tar.gz TCE-a9bb8d1be024730fc4687aab78a8e5cb54b4f05e.zip |
More OOP;
Diffstat (limited to 'src/kernel/mem/paging.cpp')
-rw-r--r-- | src/kernel/mem/paging.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/kernel/mem/paging.cpp b/src/kernel/mem/paging.cpp index eb7e615..496b70c 100644 --- a/src/kernel/mem/paging.cpp +++ b/src/kernel/mem/paging.cpp @@ -109,7 +109,7 @@ page_directory *pagedir_new() { void pagedir_delete(page_directory *pd) { uint32_t i; //Unmap segments - while (pd->mappedSegs != 0) seg_unmap(pd->mappedSegs); + while (pd->mappedSegs != 0) pd->mappedSegs->seg->unmap(pd->mappedSegs); //Cleanup page tables for (i = 0; i < FIRST_KERNEL_PAGETABLE; i++) { kfree_page(pd->tables[i]); @@ -133,7 +133,9 @@ uint32_t paging_fault(registers *regs) { } if (seg != 0) { - if (seg->seg->handle_fault(seg, addr, (regs->err_code & 0x2) && (regs->eip < K_HIGHHALF_ADDR)) != 0) seg = 0; + if (seg->seg->handle_fault(seg, addr, (regs->err_code & 0x2) && (regs->eip < K_HIGHHALF_ADDR)) != 0) { + seg = 0; + } } if (seg == 0) { |