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();
|
cli();
|
||||||
struct task *it = current_task->next;
|
struct task *it = current_task->next;
|
||||||
while (it && it->status != RUN) {
|
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;
|
struct task *new_it = it->prev;
|
||||||
func[it->status](it);
|
func[it->status](it);
|
||||||
it = new_it;
|
it = new_it;
|
||||||
|
Loading…
Reference in New Issue
Block a user