cpu/arm7_common: Fix thread_yield_higher in ISR#11887
cpu/arm7_common: Fix thread_yield_higher in ISR#11887benpicco merged 1 commit intoRIOT-OS:masterfrom
Conversation
thread_yield_higher() in interrupt context must not yield immediately, but at the end of the ISR. This commit fixes the behavior.
|
Maybe @cladmi can have a short look and maybe @kaspar030 or @miri64 could review? |
|
To complete on the comments on #11759 and #11883 (comment)
Boards have specific handling for For me, it has become de-facto necessary that these functions must be callable from interrupt context. This change now makes (the mixed output at the beginning is also here on The test from #11759 also works with this PR |
|
@kaspar030, @miri64, @PeterKietzmann: Could one of you review this PR? |
|
I did not really follow the discussion around |
benpicco
left a comment
There was a problem hiding this comment.
I don't have hardware to test, but the change is easy to follow nonetheless.
sched_context_switch_request is evaluated by arm_irq_handler right after the ISR (which is the only piece of code that could call thread_yield_higher() in interrupt context) has been executed.
When not in interrupt context, a Supervisor Call is executed as before.
|
The test from #11759 is now working in master. I updated the PR description there. Thank you for handling it. |
Contribution description
thread_yield_higher()in interrupt context must not yield immediately, but at the end of the ISR. This PR fixes the behavior.Testing procedure
Issues/PRs references
Addresses the issue identified in #11759