Re: [PATCH 1/6] UML - Fix inlines

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: Jeff Dike <jdike@...>, LKML <linux-kernel@...>, uml-devel <user-mode-linux-devel@...>, Adrian Bunk <bunk@...>
Date: Monday, August 20, 2007 - 3:55 pm

On Mon, Aug 20, 2007 at 12:40:30PM -0700, Andrew Morton wrote:

With gcc <= 4.2, when using "extern inline" in no case the function is
compiled on its own, not even if you refer to its address explicitly.  
Such an address becomes an external reference, as if you had only 
declared the function, and had not defined it.

In C99 (and therefore in gcc >= 4.3), "extern inline" means that the 
function should be compiled inline where the inline definition is seen, 
and that the compiler should also emit a copy of the function body with 
an externally visible symbol.

Except for the Alpha port all users in the kernel used "extern inline" 
only for getting "static inline" semantics (older gcc versions didn't 
offer the always_inline function attribute).

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/6] UML - Fix inlines, Jeff Dike, (Fri Aug 17, 3:43 pm)
Re: [PATCH 1/6] UML - Fix inlines, Andrew Morton, (Mon Aug 20, 3:40 pm)
Re: [PATCH 1/6] UML - Fix inlines, Adrian Bunk, (Mon Aug 20, 3:55 pm)