LKML Archive on
help / color / mirror / Atom feed
From: "Robert P. J. Day" <>
To: Linux kernel mailing list <>
Subject: can someone explain "inline" once and for all?
Date: Fri, 19 Jan 2007 06:56:54 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0701190645400.24224@CPE00045a9c397f-CM001225dbafb6> (raw)

  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).


             reply	other threads:[~2007-01-19 12:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-19 11:56 Robert P. J. Day [this message]
2007-01-19 13:01 ` Pekka Enberg
2007-01-19 13:19   ` Robert P. J. Day
2007-01-19 14:13   ` Adrian Bunk
2007-01-19 14:44     ` Robert P. J. Day
2007-01-19 14:53     ` Robert P. J. Day
2007-01-19 13:37 ` Andreas Schwab
2007-01-19 13:48   ` Robert P. J. Day
2007-01-19 13:58     ` Andreas Schwab
2007-01-19 14:00       ` Robert P. J. Day
2007-01-19 17:15 ` Alexandre Oliva
2007-01-19 17:36   ` Adrian Bunk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0701190645400.24224@CPE00045a9c397f-CM001225dbafb6 \ \ \
    --subject='Re: can someone explain "inline" once and for all?' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).