[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


  • To: Julien Grall <Julien.Grall@xxxxxxx>, "minios-devel@xxxxxxxxxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxxxxxxxxx>, Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
  • From: "Justin He (Arm Technology China)" <Justin.He@xxxxxxx>
  • Date: Fri, 27 Sep 2019 09:26:25 +0000
  • Accept-language: en-US, zh-CN
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f03YdR6GFkPL+RJbO/NJSt+97iC4AZHxuY3Ro7jxRag=; b=T76qP92pVkUJhL4mXB8BeeLnMFuQIuPw2jmXbej2IC3S2IiNrD64bZXe5nWAqZB/1zvrlqVBZ0a10YAdBwxtsmBlEFVH6aHtyE9HKStp3xTXc2K4/uG3U3WWcyU8yhuNbkdOm6NoQemYEDkkeY/pmtyn5DUhsi3XspQglWHJ8z1Et9gJaYtN4view6xnZge95bMtzdbN9HwIVBIizYby22YSQn8znHzwgcXqRhvlkppwzdGhIOy17P1X5PwuiaTGxYN1qylFz3RaZTixZEghMV6ftQaHo522cDIvQ3zsXYk4un8JZSlAkMfSbQQ3oAFvgdPHT4Cq9pMfxZL7d/2Gyg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WfTYrJSiwJKUQOD00OsKgiDR4WAhleOlDHze6ZBCbf/a2YSOt80GjdXHeZXeiNHa6qKXSdWHfmKFIp3W9t5t42yyI5zB1h7Olf+NS32yFYAsQd4wE6ENk9Q3fp9Zqe5jt6BShU5c+QKUlU4RPgHOUzv61x3XT/YB+az1mQyRh1Zcp3mepArUqhetpZl5xb2hIQACddAh0VG/k5ePLVLM4BQ4UYqS3cQj5dhGRX0EhSIdIyjn3vO2O3VlUeh/Hp8Evv3awg5wypid18lqbLlsMGyonANB8zKcOnSPkxf5LVT4+EiZ1kf4DAKw/oTFaMqdKenrfeX44LR3JlZdnLbClA==
  • Authentication-results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.xenproject.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.xenproject.org; dmarc=none action=none header.from=arm.com;
  • Authentication-results-original: spf=none (sender IP is ) smtp.mailfrom=Justin.He@xxxxxxx;
  • Cc: Felipe Huici <felipe.huici@xxxxxxxxx>, "Kaly Xin \(Arm Technology China\)" <Kaly.Xin@xxxxxxx>, "Sharan.Santhanam@xxxxxxxxx" <Sharan.Santhanam@xxxxxxxxx>, "Santiago.Pagani@xxxxxxxxx" <Santiago.Pagani@xxxxxxxxx>
  • Delivery-date: Fri, 27 Sep 2019 09:26:45 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Justin.He@xxxxxxx;
  • Thread-index: AQHVdQBlHrrC9d2UsEGp7u6OmuZsvqc/PAeAgAAFCSA=
  • Thread-topic: [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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.