From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::244; helo=mail-wm0-x244.google.com; envelope-from=sigmaepsilon92@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (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 54DBE21A0292D for ; Fri, 22 Dec 2017 10:49:47 -0800 (PST) Received: by mail-wm0-x244.google.com with SMTP id f206so23180744wmf.5 for ; Fri, 22 Dec 2017 10:54:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=3qdTwo6Eob5cIQx/Ax09d7S1YWaohfbJlMMtbyIE+nU=; b=ecifDEQd0XIUeDUQwcC788XMb1N2EmD7DQ+rP8sqw+damrd5ye9gVN7YHR5MN2jaCh t31GdZzwKPGOMl9p+7KNZ9RpHuRZJIgr3dGE2DXmLkNvFtR3IHGT5N0JLwAkEx5Uf7wK GVqOhbgabvNPWstXQlXrJcBTLZuIRKZrnCSe72Ip+jBRkRvEMXjZWzMw6R2yr892Du85 vxx1yP+6gHwyq1CKzhI2eeLvlsXqj+l1bMxjnYFfZkTNk7LbqsvcQUdViaO6xqZvK8Tg aaXyT1YOU1/hUIEwSCXrR5nTqooF61Vwk5Cc9scrNh/yY1GL9Qqja5+uDhIR47CZlEaH 5evw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=3qdTwo6Eob5cIQx/Ax09d7S1YWaohfbJlMMtbyIE+nU=; b=RyeV6qI676Qxoiow2BPJAiPjPEcDWajXByb1ffVoIM1NhH/27jqL7XIxWu9h3u43mZ OS2nK+gEWQG8cz1o0keFGAW9MSuwDpjg5o5iguMiq9mELB60vWzOrOrNhCpGWsyqB7LA /eWRpew6lWqhiLiBtdVOJIJ7Ws/ghLWBzZDJj1T7VRKbvq2h/LZi327E8CWAFYYtXVvS M8WGpdZm5LH/x1u3pF1ybDv/r71Ryvty5/AKh5RxqxHVww7kj+p2+dMFWwhH/AjigMAK 8THUKXnaPwvgi781pU9D2vHqd8Pu2cO+1Rh2PBoPYHmXWJwtaQbIgNQ+8ss/oAxI8LRS Cq7Q== X-Gm-Message-State: AKGB3mIG4T3Y2P3gG0WDQUjf21782mj1r67jTmj1o9PWM54teGIArMzF L9sKGZScHDofc+Or3dADTwnJKB1Q X-Google-Smtp-Source: ACJfBov79CzJQIHm5PITYC8Qs/X1kh1aHux+YuhrssHk5JiBPdXm6WniB+IY7Wy8wvf1EVSKc0IcaA== X-Received: by 10.28.27.206 with SMTP id b197mr13905887wmb.96.1513968875846; Fri, 22 Dec 2017 10:54:35 -0800 (PST) Received: from localhost.localdomain ([2a02:908:5a9:8400:5ec8:3210:9b68:c91c]) by smtp.gmail.com with ESMTPSA id 17sm11139990wmq.10.2017.12.22.10.54.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Dec 2017 10:54:35 -0800 (PST) From: M1cha To: edk2-devel@lists.01.org Cc: Ard Biesheuvel , Michael D Kinney , Liming Gao Date: Fri, 22 Dec 2017 19:54:33 +0100 Message-Id: <20171222185433.27385-1-sigmaepsilon92@gmail.com> X-Mailer: git-send-email 2.15.1 Subject: [PATCH v2 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 18:49:47 -0000 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael Zimmermann --- MdePkg/Include/Base.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 22ab5d3715fb..9c8f5d643f42 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -218,6 +218,14 @@ VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4); #endif #endif +#ifndef RETURNS_TWICE + #if defined (__GNUC__) || defined (__clang__) + #define RETURNS_TWICE __attribute__((returns_twice)) + #else + #define RETURNS_TWICE + #endif +#endif + // // For symbol name in assembly code, an extra "_" is sometimes necessary // -- 2.15.1