wip: eip saved after the interrupt
This commit is contained in:
@ -3,10 +3,7 @@
|
||||
#include "kpanic.h"
|
||||
#include "memory.h"
|
||||
|
||||
static void set_eip(void (*fn)(void), struct task *task)
|
||||
{
|
||||
// TODO or not TODO
|
||||
}
|
||||
uint32_t eip_backup;
|
||||
|
||||
static struct task *create_task(uint8_t owner_id)
|
||||
{
|
||||
@ -30,11 +27,14 @@ void exec_fn(void (*fn)(void))
|
||||
if (!new_task)
|
||||
kpanic("failed to create new task");
|
||||
new_task->status = RUN;
|
||||
new_task->eip = (uint32_t *)fn;
|
||||
new_task->next = current_task;
|
||||
new_task->prev = current_task->prev;
|
||||
current_task->prev = new_task;
|
||||
new_task->prev = new_task;
|
||||
if (current_task) {
|
||||
new_task->prev = current_task->prev;
|
||||
current_task->prev = new_task;
|
||||
}
|
||||
current_task = new_task;
|
||||
set_eip(fn, new_task);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user