extern inline vs. static inline

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

 



Sorry if I'm in the wrong by cross-posting to both of these lists, but I
think it's applicable as I'm a kernel newbie, and this may be a potential
janitor task.

I was looking at the message on linux kernel with regards to kernel 
debuggers, and came across:

http://www.uwsg.indiana.edu/hypermail/linux/kernel/0203.3/0985.html

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

From: David S. Miller (davem@redhat.com)
Date: Fri Mar 29 2002 - 23:25:53 EST

   From: Andrew Morton <akpm@zip.com.au>
   Date: Fri, 29 Mar 2002 20:24:05 -0800
   
   I *have* had problems with -fno-inline. I'd very much like
   to be able to turn that on, but the presence of `extern inline'
   functions causes a link failure with `-fno-inline'.

Feel free to submit the patch that converts the remaining extern
inline into static inline. That is the correct solution.

GCC has every right not to inline and expect the function name to be
referencable externally if you say extern inline, so this is another
reason to fix the remaining extern inline instances. 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Does this imply that it is ALWAYS better to use "static inline" instead of 
"extern inline"? According to this:

http://linux-study.cs.ccu.edu.tw/HyperNews/get/gcc/2.html

"extern inline is almost always the wrong thing".

So should the kernel source be changed to read "static inline" everywhere 
where it used to be "extern inline"?


-michael


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux