[Pixman] [PATCH 3/4] Add noinline macro

Dmitri Vorobiev dmitri.vorobiev at movial.com
Fri Sep 17 07:52:22 PDT 2010


This patch adds a noinline macro, which expands to compiler-dependent
keywords that tell the compiler to never inline a function.
---
 pixman/pixman-compiler.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/pixman/pixman-compiler.h b/pixman/pixman-compiler.h
index 5501396..d4852a4 100644
--- a/pixman/pixman-compiler.h
+++ b/pixman/pixman-compiler.h
@@ -50,13 +50,18 @@
 /* 'inline' is available only in C++ in MSVC */
 #   define inline __inline
 #   define force_inline __forceinline
+#   define noinline __declspec(noinline)
 #elif defined __GNUC__ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))
 #   define inline __inline__
 #   define force_inline __inline__ __attribute__ ((__always_inline__))
+#   define noinline __attribute__((noinline))
 #else
 #   ifndef force_inline
 #      define force_inline inline
 #   endif
+#   ifndef noinline
+#      define noinline
+#   endif
 #endif
 
 /* GCC visibility */
-- 
1.6.3.3



More information about the Pixman mailing list