From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::241; helo=mail-it0-x241.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x241.google.com (mail-it0-x241.google.com [IPv6:2607:f8b0:4001:c0b::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 76229208F7A5D for ; Fri, 22 Dec 2017 07:19:12 -0800 (PST) Received: by mail-it0-x241.google.com with SMTP id t1so14664150ite.5 for ; Fri, 22 Dec 2017 07:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XjbD64fsoRClDE25kYJmJLKKEqOVJnF4+VUPybcPv+8=; b=d9QZLDztx5WoYkzRYMlKjBQO48nQvSAw1l/CFHBwZxYiCgXZjHa69WGCDMEXR8Xza2 04JkPgOD9rsGJX5GmddDyWbqq4GPN6yd4TkxCtixeQ/FjL1+ifGoIXTOzTcLIo7eRvZB dsK4vmhxVhrPQ8QpOldrGeLcdNluS/puqyQWM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XjbD64fsoRClDE25kYJmJLKKEqOVJnF4+VUPybcPv+8=; b=aNYzoFjONVkurCugC/nWLaz+8STVUbRypr2Al7B9AVkiosXI+ynBuaDg7LFUVLdDos mmMIIGEX3zo7wuo7aiKLXjo9xnA7yCw0Zdcn3HSwuatu0gWSJOIf4C+x83zsttVXbyHX oF+XyE0TicpYPQDDyZsdpDk/PqkMKNW1Fa84qGCiEPps5Iz6WK0RHFyGfKyES/dAAHUl tvLg6DW7OPKOGV5jDZdbFpomsBs0S3jIEPhlf63To0KXQmlPh1sax/lSEIMJTStxadxG tUcHqsVl6HmktHR3SUxSSDexfD0W9C2BTWXDpHJtlMfQJyQDYzY36zxWy401inKyjlPo 5rKw== X-Gm-Message-State: AKGB3mL835Nm/mnbVnthRP9ZHTWgWpXEPZPT2aZhh1U4wbIPX0jzH0d7 7Prxl3+YmSu4nVV80Lrz9qsmmwNeWErT6gpV2QCNFg== X-Google-Smtp-Source: ACJfBovtcE4ovAiVNJQpZ5tstVB/iTz9L0DIIonl6oeYOPC4YKQDQUcZ43POpOBsKbiBuFiYBrIyXOVSeEFN7ZUcA3g= X-Received: by 10.36.219.214 with SMTP id c205mr17788800itg.65.1513956241627; Fri, 22 Dec 2017 07:24:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.52.14 with HTTP; Fri, 22 Dec 2017 07:24:01 -0800 (PST) In-Reply-To: <20171222072336.23504-2-sigmaepsilon92@gmail.com> References: <20171222072336.23504-1-sigmaepsilon92@gmail.com> <20171222072336.23504-2-sigmaepsilon92@gmail.com> From: Ard Biesheuvel Date: Fri, 22 Dec 2017 15:24:01 +0000 Message-ID: To: M1cha Cc: "edk2-devel@lists.01.org" , Michael D Kinney , Liming Gao Subject: Re: [PATCH 1/3] MdePkg: add RETURNS_TWICE attribute X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2017 15:19:12 -0000 Content-Type: text/plain; charset="UTF-8" On 22 December 2017 at 07:23, M1cha wrote: > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Michael Zimmermann > --- > MdePkg/Include/Base.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h > index 22ab5d3715fb..c863de407418 100644 > --- a/MdePkg/Include/Base.h > +++ b/MdePkg/Include/Base.h > @@ -218,6 +218,16 @@ VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4); > #endif > #endif > > +#ifndef RETURNS_TWICE > + #if defined (__GNUC__) || defined (__clang__) > + #define RETURNS_TWICE __attribute__((returns_twice)) > + #elif defined(_MSC_EXTENSIONS) && !defined(MDE_CPU_EBC) > + #define RETURNS_TWICE > + #else > + #define RETURNS_TWICE What is the point of having two versions that are #defined to nothing? > + #endif > +#endif > + > // > // For symbol name in assembly code, an extra "_" is sometimes necessary > // > -- > 2.15.1 >