diff options
| author | Miguel <m.i@gmx.at> | 2018-10-01 14:37:18 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-10-01 14:37:18 +0200 |
| commit | b518f39803eaaf0b25b95baf951b12ef4d5a727e (patch) | |
| tree | d595877fd1869b280ba33bc2256a3b3da8eb8c95 /kernel/scheduler.c | |
| parent | 75433d155c152b809e9f25b1099fc06d6106308b (diff) | |
struggling with interrupts and scheduler
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++) { |
