lkml.org 
[lkml]   [2004]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectIs extern inline -> static inline OK?
Pardon my ignorance...

Under what conditions is it NOT OK to convert "extern inline"
to "static inline"?

Linus once wrote:
> - "static inline" means "we have to have this function, if you use it
> but don't inline it, then make a static version of it in this
> compilation unit"
>
> - "extern inline" means "I actually _have_ an extern for this function,
> but if you want to inline it, here's the inline-version"
>
> ... we should just convert
> all current users of "extern inline" to "static inline".

But Richard Henderson rejected (in 2002) the following patch (excerpt):

-#define __EXTERN_INLINE extern inline
+#define __EXTERN_INLINE static inline

presumably because the exact semantics of extern inline were
required. I can only find __EXTERN_INLINE in the alpha
architecture. Is the requirement to use 'extern' rather
than 'static' unique to alpha?

Thanks for any illumination on this.

=============================
Tim Bird
Architecture Group Co-Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
E-mail: tim.bird@am.sony.com
=============================
-
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: 2005-03-22 14:04    [W:0.051 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site