diff options
| author | GuEe-GUI <[email protected]> | 2024-09-11 12:56:28 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2024-09-19 21:14:42 +0800 |
| commit | 04cdbc647c28b04d21ddb50fe80210dec30b5927 (patch) | |
| tree | 509022e038f2a8e07e01d10c8e5d6d05ea132798 /components | |
| parent | 55b40b5164b8583b66122be2d62f141daee776b3 (diff) | |
[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 <[email protected]>
Diffstat (limited to 'components')
| -rw-r--r-- | components/drivers/pic/pic.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/components/drivers/pic/pic.c b/components/drivers/pic/pic.c index 5cd2ece005..8893f974c2 100644 --- a/components/drivers/pic/pic.c +++ b/components/drivers/pic/pic.c @@ -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_pic_irq_ack(child->irq); + if (child->pic->ops->irq_ack) + { + child->pic->ops->irq_ack(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); + } } } |
