fix: infinite loop when only one task
This commit is contained in:
		| @ -10,7 +10,7 @@ void scheduler(void) | ||||
| 	if (!current_task) | ||||
| 		return; | ||||
| 	struct task *it = current_task->next; | ||||
| 	while (it && it->status != RUN) | ||||
| 	while (it && it->next != it && it->status != RUN) | ||||
| 		it = it->next; | ||||
| 	switch_to_task(it); | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user