BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / commit / 665af0a43af0d406733bda816ca1a7b2f9184319 / memory / paging.c

// Related

Nucleus

Barry Improved page fault handling and mmap system call 665af0a (3 years, 2 months ago)
diff --git a/memory/paging.c b/memory/paging.c
index 75d762a..fe08a96 100644
--- a/memory/paging.c
+++ b/memory/paging.c
@@ -46,6 +46,8 @@ set_page(uintptr_t vaddr, page_t page)
 	/* Create table if not present */
 	if (!(tables[tbl] & PDE_PRESENT)) {
 		tables[tbl] = alloc_frame() | PDE_PRESENT | PDE_WRITE;
+		if (page & PTE_USER)
+			tables[tbl] |= PDE_USER;
 		memset(mappings + (tbl * 1024), 0, PAGE_SIZE);
 	}
 	mappings[address] = page;