From be40c01ddd6f43a527abeae31042ba7978aabb58 Mon Sep 17 00:00:00 2001 From: Yanfeng Liu Date: Thu, 9 Jan 2025 07:59:55 +0800 Subject: [PATCH] nuttx/addrenv.h: revise assembly guard This allows the header file to be useful from non-C sources such as assembly code or linker scripts. Signed-off-by: Yanfeng Liu --- include/nuttx/addrenv.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/nuttx/addrenv.h b/include/nuttx/addrenv.h index a3887476f7..4748bef90b 100644 --- a/include/nuttx/addrenv.h +++ b/include/nuttx/addrenv.h @@ -29,6 +29,8 @@ #include +#ifndef __ASSEMBLY__ + #ifdef CONFIG_BUILD_KERNEL # include #endif @@ -40,6 +42,8 @@ #include +#endif /* __ASSEMBLY__ */ + #ifdef CONFIG_ARCH_ADDRENV /**************************************************************************** @@ -241,6 +245,9 @@ (CONFIG_ARCH_PGPOOL_VBASE + CONFIG_ARCH_PGPOOL_SIZE) #endif + +#ifndef __ASSEMBLY__ + /**************************************************************************** * Public Type Definitions ****************************************************************************/ @@ -251,8 +258,6 @@ struct tcb_s; /* Forward reference to TCB */ * Public Types ****************************************************************************/ -#ifndef __ASSEMBLY__ - struct addrenv_s { struct arch_addrenv_s addrenv; /* The address environment page directory */