public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Michael Matz <matz@suse.de>
Cc: ak@suse.de, discuss@x86-64.org, linux-kernel@vger.kernel.org
Subject: Re: [discuss] [2.6 patch] include/asm-x86_64 "extern inline" -> "static inline"
Date: Mon, 5 Sep 2005 20:00:05 +0200	[thread overview]
Message-ID: <20050905180005.GA3776@stusta.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0509051047530.27439@wotan.suse.de>

On Mon, Sep 05, 2005 at 10:52:47AM +0200, Michael Matz wrote:
> Hi,
> 
> On Fri, 2 Sep 2005, Adrian Bunk wrote:
> 
> > "extern inline" doesn't make much sense.
> 
> It does.  It's a GCC extension which says "never ever emit an out-of-line
> version of this function, not even if its address is taken", i.e. it's
> implicitely assumed, that if there is a need for such out-of-line variant,
> then it is provided by some other mean (for instance by defining it
> without inline markers in some .o file).  Usually there won't be such need

So you agree with my statement that it doesn't make sense because there 
are no out-of-line variants?

> as all instances are inlined, in which case the out-of-line version would
> be dead bloat, which you can't get rid of without this extension.  And if
> some calls are not inlined then this extension serves as a poor mans
> check, because a link error will result.

In the kernel (with gcc >= 3.1), _every_ inline is forced to             
always_inline resulting in gcc aborting with an error if it can't inline 
the function.

Therefore any such out-of-line version if it existed would be dead 
bloat.

> All in all, it does make sense, and no it's not the same as a "static 
> inline", not even if forced always_inline.

It isn't the same, but "static inline" is the correct variant.

"extern inline __attribute__((always_inline))" (which is what
"extern inline" is expanded to) doesn't make sense.

> Ciao,
> Michael.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  reply	other threads:[~2005-09-05 18:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-02 20:31 [2.6 patch] include/asm-x86_64 "extern inline" -> "static inline" Adrian Bunk
2005-09-05  8:52 ` [discuss] " Michael Matz
2005-09-05 18:00   ` Adrian Bunk [this message]
2005-09-05 18:47     ` Jakub Jelinek
2005-09-05 19:00       ` Adrian Bunk
2005-09-06  4:38         ` H. Peter Anvin
2005-09-06 17:54       ` Terrence Miller
2005-09-06 20:23         ` Andi Kleen
2005-09-06 20:32           ` David S. Miller
2005-09-06 20:55           ` Terrence Miller
2005-09-06 21:41             ` Michael Matz
2005-09-07  0:07               ` H. Peter Anvin
2005-09-06 21:49             ` Andi Kleen
2005-09-05 23:25 ` Andi Kleen

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=20050905180005.GA3776@stusta.de \
    --to=bunk@stusta.de \
    --cc=ak@suse.de \
    --cc=discuss@x86-64.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matz@suse.de \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox