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 f327f6907192b77e39099ee972fef580bad49a11
Author: anjiahao <[email protected]>
AuthorDate: Wed May 6 17:14:24 2026 +0800

    libc/machine: Give LIBC_ATOMIC_IRQ a prompt and a rationale.
    
    LIBC_ATOMIC_IRQ was a hidden boolean.  Give it a user-visible prompt
    and document why it is needed: on targets whose backing memory (for
    example external AXI RAM without the ARM EXCLUSIVE bus extension)
    LDREX/STREX never succeeds, so the toolchain-provided atomic ops
    deadlock.  Switching to IRQ-disable atomics restores forward progress.
    
    No functional change; the option was already selectable through
    dependent configs, this just makes it directly visible in menuconfig
    and self-documents the use case.
    
    Signed-off-by: anjiahao <[email protected]>
    Signed-off-by: ganjing <[email protected]>
---
 libs/libc/machine/Kconfig | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libs/libc/machine/Kconfig b/libs/libc/machine/Kconfig
index 032fc3790f6..737456bac4b 100644
--- a/libs/libc/machine/Kconfig
+++ b/libs/libc/machine/Kconfig
@@ -43,10 +43,12 @@ config LIBC_ATOMIC_HWSPINLOCK
                arch_atomic by chip hwspinlock
 
 config LIBC_ATOMIC_IRQ
-       bool
+       bool "Implement libc atomic using IRQ disable/enable"
        default n
        ---help---
-               atomic function by irq disable/enable
+               atomic function by irq disable/enable.  Required on targets 
whose
+               backing memory (e.g. external AXI RAM) does not implement the
+               ARM EXCLUSIVE bus extension, so LDREX/STREX always fails.
 
 config LIBC_ATOMIC_NOINLINE
        bool "Do not inline the atomic functions"

Reply via email to