support irq

This commit is contained in:
TXuian
2024-04-25 09:32:10 +08:00
parent 213a92330e
commit 52b549c14c
9 changed files with 170 additions and 12 deletions

View File

@@ -179,7 +179,7 @@ static void _scheduler(struct SchedulerRightGroup right_group)
next_task = NULL;
/* find next runnable task */
assert(cur_cpu()->task == NULL);
if (next_task_emergency != NULL) {
if (next_task_emergency != NULL && next_task->state == READY) {
next_task = next_task_emergency;
next_task->state = RUNNING;
next_task_emergency = NULL;