[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCH v2 5/6] plat/common: Add macro to avoid nested including header file
Hi, On 27/09/2019 07:53, Jia He wrote: This is to add the macro to avoid avoid nested including header file s/the macro/the header guards/But the header guard does not prevent nesting (which I understand as calling #include "cpu.h"), it only ensure the definitions present in the header are only add one even if the header is included multiple times. Cheers, plat/common/include/arm/arm64/cpu.h Signed-off-by: Jia He <justin.he@xxxxxxx> --- plat/common/include/arm/arm64/cpu.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plat/common/include/arm/arm64/cpu.h b/plat/common/include/arm/arm64/cpu.h index 23adf8d..ff33f7c 100644 --- a/plat/common/include/arm/arm64/cpu.h +++ b/plat/common/include/arm/arm64/cpu.h @@ -32,6 +32,9 @@ * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY. */+#ifndef __PLAT_COMMON_ARM64_CPU_H__+#define __PLAT_COMMON_ARM64_CPU_H__ + #include <inttypes.h> #include <uk/essentials.h> #include <sw_ctx.h> @@ -136,3 +139,5 @@ static inline void arch_init_extregs(struct sw_ctx *ctx) { ctx->extregs = (uintptr_t)ctx + sizeof(struct sw_ctx); } + +#endif /* __PLAT_COMMON_ARM64_CPU_H__ */ -- Julien Grall _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |