diff options
Diffstat (limited to 'src/kernel/task/task.cpp')
-rw-r--r-- | src/kernel/task/task.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/kernel/task/task.cpp b/src/kernel/task/task.cpp index 03425b5..5dea33b 100644 --- a/src/kernel/task/task.cpp +++ b/src/kernel/task/task.cpp @@ -68,7 +68,6 @@ void tasking_updateKernelPagetable(uint32_t idx, page_table *table, uint32_t tab /* Called when a timer IRQ fires. Does a context switch. */ void schedule() { - //if (processes == 0) PANIC("No processes are running !"); asm volatile("cli"); uint32_t esp, ebp, eip; @@ -205,6 +204,7 @@ void process_exit(size_t retval) { (its address is the value given for EIP). It switches to user mode if necessary and calls the entry point. */ static void thread_run(void* u_esp, thread *thread, thread_entry entry_point, void *data) { + asm volatile("cli"); pagedir_switch(thread->process->pagedir); if (thread->process->privilege >= PL_USER) { //User mode ! uint32_t *stack = (uint32_t*)u_esp; @@ -237,6 +237,7 @@ static void thread_run(void* u_esp, thread *thread, thread_entry entry_point, vo push %%eax; \ pushl $0x1B; \ push %%ecx; \ + sti; \ iret; \ " : : "b"(esp), "c"(eip)); } else { |