From 2fc03e597e97d2139490a303b95e5ad807ee4239 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 14 Apr 2021 14:13:44 +0200 Subject: Improve task loading --- src/core/paging.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'src/core/paging.c') diff --git a/src/core/paging.c b/src/core/paging.c index 8f12866..0fab46a 100644 --- a/src/core/paging.c +++ b/src/core/paging.c @@ -88,24 +88,30 @@ char* paging_allocate_next_page(){ asm("hlt"); } - -char *paging_allocate(int p){ +// TODO: Take p into account +int *paging_allocate(int p){ + // ----- Allow kernel access during interruption int *page_dir=(int*)paging_allocate_next_page(); - int *page_table; - int current_page_entry=0; - int current_dir_entry=0; - while(current_page_entry