Currently, there may be multiple interrupt controllers allocated, even though there is only one hardware instance (NVIC). The issue is that is no_os_irq_ctrl_remove() is called for an interrupt controller with ref = 0, all the callback functions will be removed, even those which were registered using another controller.
Fix this by turning the interrupt controller into a shared reference, thus max_irq_ctrl_remove() will only be called once ref = 0.
Pull Request Description
Please replace this with a detailed description and motivation of the changes.
You can tick the checkboxes below with an 'x' between square brackets or just check them after publishing the PR.
If this PR contains a breaking change, list dependent PRs and try to push all related PRs at the same time.
PR Type
[ ] Bug fix (change that fixes an issue)
[ ] New feature (change that adds new functionality)
[ ] Breaking change (has dependencies in other repos or will cause CI to fail)
Currently, there may be multiple interrupt controllers allocated, even though there is only one hardware instance (NVIC). The issue is that is no_os_irq_ctrl_remove() is called for an interrupt controller with ref = 0, all the callback functions will be removed, even those which were registered using another controller.
Fix this by turning the interrupt controller into a shared reference, thus max_irq_ctrl_remove() will only be called once ref = 0.
Pull Request Description
Please replace this with a detailed description and motivation of the changes. You can tick the checkboxes below with an 'x' between square brackets or just check them after publishing the PR. If this PR contains a breaking change, list dependent PRs and try to push all related PRs at the same time.
PR Type
PR Checklist