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/05/19 15:16:43 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on pull request #6283: pthread/spinlock: Call up_testsest directly in the flat build

gustavonihei commented on PR #6283:
URL: https://github.com/apache/incubator-nuttx/pull/6283#issuecomment-1131857075

   > > Change looks good. I'm just wondering if `arch_atomic.c` is the best place for the `up_testset` function.
   > > cc. @gustavonihei
   > 
   > up_testset is one of atomic function.
   
   The part that makes this new location a bit weird is that `arch_atomic.c` is under `libc`, and `up_testset` is specific for spinlocks.
   
   > Actually, it isn't good to introduce up_testset since atomic is part of C/C++ standard. It's better to use the standard atomic api, > and implement them on the old toolchain by hand.
   
   So another option would be to leave `up_testset` in its place and change it to use the C11 function. And then on `arch_atomic.c`  we could provide the implementation for the GCC/Clang builtins for those archs that don't support.
   
   


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