wip: fork and wait are almost working (missing child's stack)

This commit is contained in:
2025-01-28 15:44:09 +01:00
parent e60969b37a
commit 1ca8c68cf5
5 changed files with 23 additions and 12 deletions

View File

@ -1,5 +1,6 @@
#include "alloc.h"
#include "debug.h"
#include "interrupts.h"
#include "kprintf.h"
#include "task.h"
#include "time.h"
@ -10,6 +11,7 @@ struct task *current_task;
void scheduler(void)
{
cli();
if (!current_task) // || current_task->next == current_task)
return;
struct task *it = current_task->next;
@ -22,4 +24,5 @@ void scheduler(void)
it = it->next;
}
switch_to_task(it);
toris();
}