Task switching fix? but doesnt exit process gracefully

This commit is contained in:
2026-02-20 16:01:34 +01:00
parent ac7216d84a
commit 4cf4fb0dda
6 changed files with 22 additions and 11 deletions

View File

@@ -8,6 +8,7 @@
#include "process.h"
#include "mem/paging/paging.h"
#include <stdint.h>
#include "io/serial/serial.h"
extern struct process_t* processes_list;
extern struct process_t* current_process;
@@ -20,7 +21,7 @@ void scheduler_init()
struct cpu_status_t* scheduler_schedule(struct cpu_status_t* context)
{
//current_process->context = context;
current_process->context = context;
current_process->status = READY;
for (;;) {
@@ -49,7 +50,6 @@ struct cpu_status_t* scheduler_schedule(struct cpu_status_t* context)
load_cr3(VIRT_TO_PHYS((uint64_t)current_process->root_page_table));
DEBUG("loaded process pml4 into cr3");
/* process_switch(current_process->context->rbp, current_process->context->iret_rip);
DEBUG("switched to process rip!"); */
return current_process->context;
}