public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2 1/3] MdePkg: add RETURNS_TWICE attribute
@ 2017-12-22 18:54 M1cha
  0 siblings, 0 replies; only message in thread
From: M1cha @ 2017-12-22 18:54 UTC (permalink / raw)
  To: edk2-devel; +Cc: Ard Biesheuvel, Michael D Kinney, Liming Gao

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
---
 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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-22 18:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-22 18:54 [PATCH v2 1/3] MdePkg: add RETURNS_TWICE attribute M1cha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox