summaryrefslogtreecommitdiffstats
path: root/arch/x86_64/tasking.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/tasking.c')
-rw-r--r--arch/x86_64/tasking.c13
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;
-}