lkml.org 
[lkml]   [2006]   [Jan]   [6]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[patch 1/7] Make __always_inline actually force always inlining
FromArjan van de Ven <>
DateFri, 06 Jan 2006 11:37:05 +0100
From: Ingo Molnar <mingo@elte.he>

This patch is the first in a series that tries to optimize the kernel in terms of size
(and thus cache behavior, both cpu and pagecache).

This first patch changes __always_inline to be a forced inline instead of
the "regular" inline it was on everything except alpha. This forced inline
matches the intention of the define better as a matter of documentation.
There is no change in behavior by this patch, since "inline" currently is
mapped to a forced inline anyway.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@infradead.org>

===================================================================
--- linux-2.6.15.orig/include/linux/compiler-gcc3.h
+++ linux-2.6.15/include/linux/compiler-gcc3.h
@@ -9,6 +9,8 @@
 # define __inline	__inline	__attribute__((always_inline))
 #endif
 
+#define __always_inline		inline __attribute__((always_inline))
+
 #if __GNUC_MINOR__ > 0
 # define __deprecated		__attribute__((deprecated))
 #endif
Index: linux-2.6.15/include/linux/compiler-gcc4.h
===================================================================
--- linux-2.6.15.orig/include/linux/compiler-gcc4.h
+++ linux-2.6.15/include/linux/compiler-gcc4.h
@@ -6,6 +6,7 @@
 #define inline			inline		__attribute__((always_inline))
 #define __inline__		__inline__	__attribute__((always_inline))
 #define __inline		__inline	__attribute__((always_inline))
+#define __always_inline		inline __attribute__((always_inline))
 #define __deprecated		__attribute__((deprecated))
 #define __attribute_used__	__attribute__((__used__))
 #define __attribute_pure__	__attribute__((pure))

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-06 10:48    [from the cache]
©2003-2008