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 b536a932c61691d3794eabe0edf6f1ef03ddf516
Author: buxiasen <[email protected]>
AuthorDate: Tue Nov 25 20:53:08 2025 +0800

    percpu: compatible include percpu in assembly
    
    Will cause compile error if we include in common place
    
    Guard the C declarations with __ASSEMBLY__ so that assembly files can
    include headers that pull in percpu.h.
    
    Signed-off-by: buxiasen <[email protected]>
---
 include/nuttx/percpu.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/nuttx/percpu.h b/include/nuttx/percpu.h
index 683007b18e3..b6afb216809 100644
--- a/include/nuttx/percpu.h
+++ b/include/nuttx/percpu.h
@@ -36,6 +36,8 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
+#ifndef __ASSEMBLY__
+
 /****************************************************************************
  * Name: up_cpu_index
  *
@@ -121,4 +123,6 @@ extern char _percpu_offset[];
 #  define this_cpu_var_bmp(v)          v
 #endif
 
+#endif /* __ASSEMBLY__ */
+
 #endif

Reply via email to