Ouss4 commented on a change in pull request #4669:
URL: https://github.com/apache/incubator-nuttx/pull/4669#discussion_r730242544
##########
File path: arch/xtensa/src/common/xtensa_cpupause.c
##########
@@ -231,10 +231,12 @@ int up_cpu_pause(int cpu)
* handler from returning until up_cpu_resume() is called; g_cpu_paused
* is a handshake that will prevent this function from returning until
* the CPU is actually paused.
+ * Note that we might spin before getting g_cpu_wait, this just means that
+ * the other CPU still hasn't finished responding to the previous resume
+ * request.
*/
- DEBUGASSERT(!spin_islocked(&g_cpu_wait[cpu]) &&
Review comment:
I think other archs will also hit the same issue if `up_cpu_pause` and
`up_cpu_resume` are called repeatedly.
##########
File path: arch/xtensa/src/common/xtensa_cpupause.c
##########
@@ -231,10 +231,12 @@ int up_cpu_pause(int cpu)
* handler from returning until up_cpu_resume() is called; g_cpu_paused
* is a handshake that will prevent this function from returning until
* the CPU is actually paused.
+ * Note that we might spin before getting g_cpu_wait, this just means that
+ * the other CPU still hasn't finished responding to the previous resume
+ * request.
*/
- DEBUGASSERT(!spin_islocked(&g_cpu_wait[cpu]) &&
Review comment:
I think other archs will also hit the same issue if `up_cpu_pause` and
`up_cpu_resume` are called repeatedly. So I also think we should relax that
assertion in the other archs as well.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]