[FIXUP/PIC] pirq's child handler should lock less

When call the child handler, the PIC ops needn't
lock again.
Critical zone protection by PIC implementers.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
This commit is contained in:
GuEe-GUI 2024-09-11 12:56:28 +08:00 committed by Rbb666
parent 55b40b5164
commit 04cdbc647c
1 changed files with 8 additions and 2 deletions

View File

@ -548,11 +548,17 @@ rt_err_t rt_pic_handle_isr(struct rt_pic_irq *pirq)
rt_list_for_each_entry(child, &pirq->children_nodes, list) rt_list_for_each_entry(child, &pirq->children_nodes, list)
{ {
rt_pic_irq_ack(child->irq); if (child->pic->ops->irq_ack)
{
child->pic->ops->irq_ack(child);
}
err = rt_pic_handle_isr(child); err = rt_pic_handle_isr(child);
rt_pic_irq_eoi(child->irq); if (child->pic->ops->irq_eoi)
{
child->pic->ops->irq_eoi(child);
}
} }
} }