masayuki2009 opened a new pull request #1992: URL: https://github.com/apache/incubator-nuttx/pull/1992
## Summary - This PR contains following two commits - 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 ## Impact - Affects SMP only ## Testing - Tested with spresense:wifi_smp (both NCPUS=2 and 3) - Tested with lc823450-xgevk:rndis - Tested with maix-bit:smp (QEMU) - Tested with esp32-core:smp (QEMU) - Tested with sabre-6quad:smp (QEMU) ---------------------------------------------------------------- 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: us...@infra.apache.org