Explorar o código

[FIXUP/PIC] set interrupt status when do traps

Signed-off-by: GuEe-GUI <2991707448@qq.com>
GuEe-GUI hai 1 ano
pai
achega
55b40b5164
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      components/drivers/pic/pic.c

+ 4 - 0
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;
 }