wip: eip saved after the interrupt

This commit is contained in:
2025-01-20 14:36:43 +01:00
parent 2fe4ac5ad5
commit b3be29246e
4 changed files with 16 additions and 8 deletions

View File

@ -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);
}
/*