diff options
Diffstat (limited to 'kernel/scheduler.c')
| -rw-r--r-- | kernel/scheduler.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/scheduler.c b/kernel/scheduler.c index ff46889..fa32ebc 100644 --- a/kernel/scheduler.c +++ b/kernel/scheduler.c @@ -123,6 +123,7 @@ static uint32_t scheduler_schedule(uint32_t idx) if(current_task[cpu]!=0)last_task[cpu]=current_task[cpu]; current_task[cpu]=idx; + klog("%d",idx); // klog("%d idx %d",last_task[cpu],current_task[cpu]); install_tss(cpu,task_list[cpu][idx].esp0); @@ -227,7 +228,7 @@ void scheduler_func() } } -volatile int add_task(uint32_t parent_pid,uint32_t vmem, bool thread) +volatile int add_task(uint32_t parent_pid,uint32_t vmem, bool thread, char *name) { static bool first=true; @@ -270,7 +271,7 @@ volatile int add_task(uint32_t parent_pid,uint32_t vmem, bool thread) if(!thread&&first) { compositor_add_window(vmem); - //first=false; + first=false; } return task_list[cpu][i].pid; @@ -320,6 +321,7 @@ void task_syscall_worker() x86_sti(); if(wake)scheduler_wake_all(); + if(cpu==0)compositor_swap_buffers(); for(int i=0;i<MAX_TASKS;i++) { |
