Task switching fix? but doesnt exit process gracefully
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user