From 55b40b5164b8583b66122be2d62f141daee776b3 Mon Sep 17 00:00:00 2001 From: GuEe-GUI <2991707448@qq.com> Date: Wed, 11 Sep 2024 12:55:31 +0800 Subject: [PATCH] [FIXUP/PIC] set interrupt status when do traps Signed-off-by: GuEe-GUI <2991707448@qq.com> --- components/drivers/pic/pic.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/drivers/pic/pic.c b/components/drivers/pic/pic.c index 75f629f974..5cd2ece005 100644 --- a/components/drivers/pic/pic.c +++ b/components/drivers/pic/pic.c @@ -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; }