Skip to content

apps: replace atomic_fetch_xxx with atomic_xxx - #3733

Open
zhangyu-duck wants to merge 1 commit into
apache:masterfrom
zhangyu-duck:pr-atomic-rename-new
Open

apps: replace atomic_fetch_xxx with atomic_xxx#3733
zhangyu-duck wants to merge 1 commit into
apache:masterfrom
zhangyu-duck:pr-atomic-rename-new

Conversation

@zhangyu-duck

@zhangyu-duck zhangyu-duck commented Aug 18, 2026

Copy link
Copy Markdown

Summary

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

Companion PR

This is the apps companion to apache/nuttx#19867 (atomic: multi-backend framework + builtin + API rename).

depends-on: apache/nuttx/pull/19867

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>
@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants