You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/10/17 00:41:04 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #4669: arch/xtensa/xtensa_cpupause.c: Allow a spin before taking the g_cpu_wait spinlock.

xiaoxiang781216 commented on a change in pull request #4669:
URL: https://github.com/apache/incubator-nuttx/pull/4669#discussion_r730222823



##########
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:
       The similar assert happen in other arch, should we relax other arch too?

##########
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:
       Ok, let's merge this PR first. Please consider provide the patch to fix other arch too, thanks.




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org