将当前的sched_cfs函数做一个包裹,套一层sched(). (#32)

* 将当前的sched_cfs函数做一个包裹,套一层sched().

* 用sched()包裹sched_cfs(),用sched_enqueue()包裹sched_cfs_enqueue()

* 用sched()包裹sched_cfs(),用sched_enqueue()包裹sched_cfs_enqueue(),并替换

* bugfix: 修正拼写错误导致的编译错误

* 修正拼写错误

Co-authored-by: fslongjin <longjin@RinGoTek.cn>
This commit is contained in:
houmkh
2022-08-31 07:59:31 +08:00
committed by GitHub
parent 8bc8890070
commit 1a2d405384
10 changed files with 59 additions and 28 deletions

View File

@ -18,7 +18,7 @@ void semaphore_down(semaphore_t *sema)
list_append(&sema->wait_queue.wait_list, &wait.wait_list);
// 执行调度
sched_cfs();
sched();
}
}
@ -35,7 +35,7 @@ void semaphore_up(semaphore_t *sema)
list_del(&wq->wait_list);
wq->pcb->state = PROC_RUNNING;
sched_cfs_enqueue(wq->pcb);
sched_enqueue(wq->pcb);
// 当前进程缺少需要的资源,立即标为需要被调度
current_pcb->flags |= PF_NEED_SCHED;