fix: do not edit task if it's the current
This commit is contained in:
parent
3766464c47
commit
1e981755de
@ -20,7 +20,7 @@ void scheduler(void)
|
||||
cli();
|
||||
struct task *it = current_task->next;
|
||||
while (it && it->status != RUN) {
|
||||
if (current_task->pid == 0 && func[it->status]) {
|
||||
if (it != current_task && func[it->status]) {
|
||||
struct task *new_it = it->prev;
|
||||
func[it->status](it);
|
||||
it = new_it;
|
||||
|
Loading…
Reference in New Issue
Block a user