aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/kernel/interrupts/isr.c2
-rw-r--r--src/kernel/tasks/process.c6
-rw-r--r--src/kernel/tasks/process.h2
3 files changed, 6 insertions, 4 deletions
diff --git a/src/kernel/interrupts/isr.c b/src/kernel/interrupts/isr.c
index 1ad5f67..66a2a38 100644
--- a/src/kernel/interrupts/isr.c
+++ b/src/kernel/interrupts/isr.c
@@ -130,7 +130,7 @@ void fault_handler(struct regs *r)
current_proc->pid);
memcpy(&current_proc->registers, r, sizeof(struct regs));
process_suspend(current_proc->pid);
- process_force_switch(r);
+ process_force_switch();
} else {
if (faulting_address != (u32)fb) {
panic("Page fault before multitasking started!");
diff --git a/src/kernel/tasks/process.c b/src/kernel/tasks/process.c
index 2f45898..a5b9c87 100644
--- a/src/kernel/tasks/process.c
+++ b/src/kernel/tasks/process.c
@@ -54,10 +54,11 @@ void scheduler(struct regs *regs)
paging_switch_directory(current_proc->cr3);
}
-void process_force_switch(struct regs *regs)
+void process_force_switch()
{
quantum = 0;
- scheduler(regs);
+ timer_wait(1);
+ //scheduler(regs);
}
void process_init(struct process *proc)
@@ -246,5 +247,6 @@ u32 uspawn(char *path)
process_spawn(proc);
log("Spawned");
+ process_force_switch();
return 0;
} \ No newline at end of file
diff --git a/src/kernel/tasks/process.h b/src/kernel/tasks/process.h
index b10c63c..32511c0 100644
--- a/src/kernel/tasks/process.h
+++ b/src/kernel/tasks/process.h
@@ -31,7 +31,7 @@ struct process {
};
void scheduler(struct regs *regs);
-void process_force_switch(struct regs *regs);
+void process_force_switch();
u32 process_spawn(struct process *process);
void process_suspend(u32 pid);