将当前的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

@ -546,7 +546,7 @@ ul process_do_exit(ul code)
sti();
process_exit_notify();
sched_cfs();
sched();
while (1)
pause();
@ -801,7 +801,7 @@ struct process_control_block *process_get_pcb(long pid)
void process_wakeup(struct process_control_block *pcb)
{
pcb->state = PROC_RUNNING;
sched_cfs_enqueue(pcb);
sched_enqueue(pcb);
}
/**
@ -812,7 +812,7 @@ void process_wakeup(struct process_control_block *pcb)
void process_wakeup_immediately(struct process_control_block *pcb)
{
pcb->state = PROC_RUNNING;
sched_cfs_enqueue(pcb);
sched_enqueue(pcb);
// 将当前进程标志为需要调度缩短新进程被wakeup的时间
current_pcb->flags |= PF_NEED_SCHED;
}