fix: infinite loop when scheduler
call before create_kernel_task
This commit is contained in:
parent
c9a92819b4
commit
18486a6705
@ -11,9 +11,9 @@ struct task *current_task;
|
|||||||
|
|
||||||
void scheduler(void)
|
void scheduler(void)
|
||||||
{
|
{
|
||||||
cli();
|
|
||||||
if (!current_task) // || current_task->next == current_task)
|
if (!current_task) // || current_task->next == current_task)
|
||||||
return;
|
return;
|
||||||
|
cli();
|
||||||
struct task *it = current_task->next;
|
struct task *it = current_task->next;
|
||||||
while (it && it->status != RUN) {
|
while (it && it->status != RUN) {
|
||||||
if (it->status == STOPPED || it->status == ZOMBIE) {
|
if (it->status == STOPPED || it->status == ZOMBIE) {
|
||||||
|
Loading…
Reference in New Issue
Block a user