From f004c1ade8d617a82cea2fe249434cccb47a2358 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Tue, 19 Mar 2024 13:03:52 -0400 Subject: rename abi to sys. better memory allocation --- arch/x86_64/tasking.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'arch/x86_64/tasking.c') diff --git a/arch/x86_64/tasking.c b/arch/x86_64/tasking.c index fe6ecdb..9b29330 100644 --- a/arch/x86_64/tasking.c +++ b/arch/x86_64/tasking.c @@ -1,4 +1,4 @@ -#include "tsk/tasking.h" +#include "usr/tasking.h" #include "mem/memory.h" #include "io/log.h" #include "lib/hashtable.h" @@ -9,7 +9,6 @@ struct TaskBody { struct Task base; - struct PageDirectory *pd; struct Registers state; }; @@ -44,7 +43,7 @@ tasking_setup(void) .base.id = s_task_id_next++, .base.kbp = ((uintptr_t)mem_slab_alloc(&s_kbp_cache)) + 0xFF0, .base.perm = (size_t)-1, - .pd = mem_current_pd + .base.pd = current_page_directory }; hashtable_insert(&s_tasks, 0, ktask); @@ -80,14 +79,8 @@ void task_free(struct Task *task) { struct TaskBody *body = (struct TaskBody*)task; - body->pd->references--; + task->pd->ref--; task->kbp -= 0xFFF; mem_slab_free(&s_kbp_cache, (void*)(task->kbp)); klogf("Need impl for task_free\n"); } - -void* -task_get_pd(struct Task *task) -{ - return ((struct TaskBody*)task)->pd; -} -- cgit v1.2.1