diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2024-03-19 13:03:52 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2024-03-19 13:03:52 -0400 |
commit | f004c1ade8d617a82cea2fe249434cccb47a2358 (patch) | |
tree | 34571e76039cf2ee2fee93c3f1bdb1bc6d2de5f6 /arch/x86_64/tasking.c | |
parent | dd5d9e1d48396cbc226ff14fe557a55613c91fcb (diff) | |
download | jove-kernel-f004c1ade8d617a82cea2fe249434cccb47a2358.tar.gz jove-kernel-f004c1ade8d617a82cea2fe249434cccb47a2358.tar.bz2 jove-kernel-f004c1ade8d617a82cea2fe249434cccb47a2358.zip |
rename abi to sys. better memory allocation
Diffstat (limited to 'arch/x86_64/tasking.c')
-rw-r--r-- | arch/x86_64/tasking.c | 13 |
1 files changed, 3 insertions, 10 deletions
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; -} |