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 2022/11/22 18:26:09 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #7649: libc: Move the common implementation of up_testset to libc/machine

pkarashchenko commented on PR #7649:
URL: https://github.com/apache/incubator-nuttx/pull/7649#issuecomment-1324082320

   What about this code:
   ```  /* Loop until we successfully take the spinlock (i.e., until the previous
      * state of the spinlock was SP_UNLOCKED).
      * NOTE that the test/set operation is performed via boardctl() to avoid a
      * variety of issues.  An option might be to move the implementation of
      * up_testset() to libs/libc/machine.
      */
   
     do
       {
   #ifdef CONFIG_BUILD_FLAT
         ret = up_testset(&lock->sp_lock) == SP_LOCKED ? 1 : 0;
   #else
         ret = boardctl(BOARDIOC_TESTSET, (uintptr_t)&lock->sp_lock);
   #endif
       }
     while (ret == 1);
   ```
   should it be modified now?


-- 
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