[FIXUP/PIC] set interrupt status when do traps

Signed-off-by: GuEe-GUI <2991707448@qq.com>
This commit is contained in:
GuEe-GUI 2024-09-11 12:55:31 +08:00 committed by Rbb666
parent 584f4b869d
commit 55b40b5164
1 changed files with 4 additions and 0 deletions

View File

@ -503,6 +503,8 @@ rt_err_t rt_pic_do_traps(void)
rt_err_t err = -RT_ERROR;
struct irq_traps *traps;
rt_interrupt_enter();
rt_list_for_each_entry(traps, &_traps_nodes, list)
{
if (traps->handler(traps->data))
@ -513,6 +515,8 @@ rt_err_t rt_pic_do_traps(void)
}
}
rt_interrupt_leave();
return err;
}