apps: replace atomic_fetch_xxx with atomic_xxx - #3733
Conversation
0d3efce to
b11b455
Compare
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s): CI run: https://github.com/apache/nuttx-apps/actions/runs/32134898362 |
Rename atomic_fetch_xxx to atomic_xxx (e.g., atomic_fetch_add -> atomic_add) and atomic_store/atomic_load to atomic_set/atomic_read, to match the <nuttx/atomic.h> API rename in the companion nuttx PR. The atomic_fetch_xxx naming is reserved by the C/C++ standard and conflicts with standard library declarations when <atomic>/ <stdatomic.h> is included by third-party code. Files changed: - crypto/openssl_mbedtls_wrapper/mbedtls/ssl_lib.c - testing/libc/atomic/atomic_main.c - testing/ostest/roundrobin.c - testing/ostest/spinlock.c Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
92a8366
b11b455 to
92a8366
Compare
❌ Cross-repo dependency could not be appliedThe Build report says the declared dependency PR(s) could not be applied, so CI did not run against the combined code: Reason: cherry-pick failed (if your PR has merge commits, rebase instead) CI run: https://github.com/apache/nuttx-apps/actions/runs/32698218070 |
|
The checkpatch |
let's ignore openssl mix case warning and merge it directly to resolve the ci error: |
Summary
Rename
atomic_fetch_xxxtoatomic_xxx(e.g.,atomic_fetch_add->atomic_add) andatomic_store/atomic_loadtoatomic_set/atomic_read, to match the<nuttx/atomic.h>API rename in the companion nuttx PR.The
atomic_fetch_xxxnaming is reserved by the C/C++ standard and conflicts with standard library declarations when<atomic>/<stdatomic.h>is included by third-party code.Files changed
crypto/openssl_mbedtls_wrapper/mbedtls/ssl_lib.ctesting/libc/atomic/atomic_main.ctesting/ostest/roundrobin.ctesting/ostest/spinlock.c