wip: fork and wait are almost working (missing child's stack)
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user