Re: [discuss] [2.6 patch] include/asm-x86_64 "extern inline" -> "static inline"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I don't think the functionality of having single copies in case 
an out of line version was needed was ever required by the Linux kernel.

extern inline was used in the kernel a long time ago as a "poor man's 
-Winline". Basically the intention was to get an linker error 
if the inlining didn't work for some reason because if we say
inline we mean inline.

But that's long obsolete because the requirements of the C++ "template is 
turing complete" people has broken inlining so badly (they want a lot of 
inlining, but not too much inlining because otherwise their compile times 
explode and the heuristics needed for making some of these pathologic cases 
work seems to break a lot of other sane code)  that the kernel was forced to 
define inline to __attribute__((always_inline)). And with that you get an 
error if inlining
fails. 

So the original purpose if extern inline is fulfilled by static inline now.
However extern inline also doesn't hurt, it really makes no difference now.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux