LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@mindspring.com>
To: Adrian Bunk <bunk@stusta.de>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: can someone explain "inline" once and for all?
Date: Fri, 19 Jan 2007 09:53:21 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0701190948170.25843@CPE00045a9c397f-CM001225dbafb6> (raw)
In-Reply-To: <20070119141355.GM9093@stusta.de>

On Fri, 19 Jan 2007, Adrian Bunk wrote:

> With the current implementation in the kernel (and considering that
> CONFIG_FORCED_INLINING was implemented in a way that it never had
> any effect), __always_inline and inline are currently equivalent.

yes, that option was implemented in a half-assed sort of way.  if you
look at compiler-gcc4.h, at first glance the preprocessing looks like
it's doing the right thing for that config option:

==================================
#include <linux/compiler-gcc.h>

#ifdef CONFIG_FORCED_INLINING
# undef inline
# undef __inline__
# undef __inline
# define inline                 inline          __attribute__((always_inline))
# define __inline__             __inline__      __attribute__((always_inline))
# define __inline               __inline        __attribute__((always_inline))
#endif
==================================

  but it's too late for checking that kernel config option, since
compiler-gcc.h has already been included, which includes:

==================================
#define inline          inline          __attribute__((always_inline))
#define __inline__      __inline__      __attribute__((always_inline))
#define __inline        __inline        __attribute__((always_inline))
==================================

so, as you say, "__always_inline and inline are currently equivalent".
which is sort of confusing and might come as a nasty surprise to some
developers who weren't expecting that.

rday


  parent reply	other threads:[~2007-01-19 15:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-19 11:56 Robert P. J. Day
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 [this message]
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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* 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.0701190948170.25843@CPE00045a9c397f-CM001225dbafb6 \
    --to=rpjday@mindspring.com \
    --cc=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --subject='Re: can someone explain "inline" once and for all?' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

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