lkml.org 
[lkml]   [2007]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectcan someone explain "inline" once and for all?

apologies if this is an inappropriately trivial question but this
has been bugging me for a while. what is the deal with "inline"?

first, there appear to be three possible ways of specifying an
inline routine in the kernel source:

$ grep -r "static inline " .
$ grep -r "static __inline__ " .
$ grep -r "static __inline " .

i vaguely recall that this has something to do with a distinction
between C99 inline and gcc inline and trying to avoid a clash between
the two, but i'm not going to put any money on that. but the
confusion probably explains why so many people insist on creating new
macros to represent inline:

$ grep -r "#define.*inline" .

is there a simple explanation for how to *properly* define inline
routines in the kernel? and maybe this can be added to the
CodingStyle guide (he mused, wistfully).

rdau

-
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: 2007-01-19 13:57    [W:0.081 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site