wip: multiple pds and switch to kernel pd when needed

This commit is contained in:
2025-02-10 13:25:19 +01:00
parent 8dd5373e7f
commit 5e561bfa15
9 changed files with 41 additions and 27 deletions

View File

@ -19,8 +19,7 @@ void scheduler(void)
if (!current_task) // || current_task->next == current_task)
return;
cli();
uint32_t *old_pd = current_task->heap;
current_task->heap = page_directory;
switch_pd(kernel_pd, (uint32_t *)((uint32_t)kernel_pd - HEAP_END));
struct task *it = current_task->next;
while (it && it->status != RUN) {
if (it != current_task && func[it->status]) {