btashton opened a new pull request #2172:
URL: https://github.com/apache/incubator-nuttx/pull/2172
## Summary
Backport #1992
sched: Fix DEBUGASSERT() in sched_unlock() for SMP
I noticed DEBUGASSERT() happens in sched_unlock()
The test was Wi-Fi audio streaming stress test with spresense 3cores
Actually, g_cpu_schedlock was locked but g_cpu_lockset was incorrect
Finally, I found that cpu was obtained before enter_critical_section()
And the task was moved from one cpu to another cpu
However, that call should be done within the critical section
This commit fixes this issue
sched: Fix sched_lock() logic for SMP
I noticed sched_lock() logic is different from sched_unlock()
I think sched_lock() should use critical section
Also, the code should be simple like sched_unlock()
This commit fixes these issues and consistent with sched_unlock()
## Impact
## Testing
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]