This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit cfc35e2748e5920374965e7e1d22bbf640649e33 Author: zhangyu117 <[email protected]> AuthorDate: Thu Aug 13 22:20:39 2026 +0800 nuttx/include/atomic.h: adjust the logic of "__ATOMIC_xxx" The memory order '__ATOMIC_xxx' is not a name specified by the standard. To achieve uniformity, if it is not defined, it will be defined one by one in the order of 0 to 5. Signed-off-by: zhangyu117 <[email protected]> --- include/nuttx/atomic.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/include/nuttx/atomic.h b/include/nuttx/atomic.h index 65456d60382..02fb266a428 100644 --- a/include/nuttx/atomic.h +++ b/include/nuttx/atomic.h @@ -77,13 +77,31 @@ typedef volatile _Atomic int64_t atomic64_t; # endif #endif -#ifndef ATOMIC_FUNC +#ifndef __ATOMIC_RELAXED # define __ATOMIC_RELAXED 0 +#endif + +#ifndef __ATOMIC_CONSUME # define __ATOMIC_CONSUME 1 +#endif + +#ifndef __ATOMIC_ACQUIRE # define __ATOMIC_ACQUIRE 2 +#endif + +#ifndef __ATOMIC_RELEASE # define __ATOMIC_RELEASE 3 +#endif + +#ifndef __ATOMIC_ACQ_REL # define __ATOMIC_ACQ_REL 4 +#endif + +#ifndef __ATOMIC_SEQ_CST # define __ATOMIC_SEQ_CST 5 +#endif + +#ifndef ATOMIC_FUNC # define ATOMIC_FUNC(f, n) nx_atomic_##f##_##n
