[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 Julien > -----Original Message----- > From: Julien Grall <julien.grall@xxxxxxx> > Sent: 2019年9月27日 17:08 > To: Justin He (Arm Technology China) <Justin.He@xxxxxxx>; minios- > devel@xxxxxxxxxxxxxxxxxxxx; Simon Kuenzer <simon.kuenzer@xxxxxxxxx> > Cc: Sharan.Santhanam@xxxxxxxxx; Felipe Huici <felipe.huici@xxxxxxxxx>; > Kaly Xin (Arm Technology China) <Kaly.Xin@xxxxxxx>; > Santiago.Pagani@xxxxxxxxx > Subject: Re: [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. Yes, it is more clear Thanks -- Cheers, Justin (Jia He) > > 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 IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |