public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Terrence Miller <Terrence.Miller@Sun.COM>
To: Andi Kleen <ak@suse.de>
Cc: discuss@x86-64.org, Jakub Jelinek <jakub@redhat.com>,
	Adrian Bunk <bunk@stusta.de>, Michael Matz <matz@suse.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [discuss] [2.6 patch] include/asm-x86_64 "extern inline" -> "static inline"
Date: Tue, 06 Sep 2005 13:55:26 -0700	[thread overview]
Message-ID: <431E023E.3050301@Sun.COM> (raw)
In-Reply-To: <200509062223.50747.ak@suse.de>

Andi Kleen wrote:
> I don't think the functionality of having single copies in case 
> an out of line version was needed was ever required by the Linux kernel.

But shouldn't the compiler that compiles Linux be C99 compliant?

> extern inline was used in the kernel a long time ago as a "poor man's 
> -Winline". Basically the intention was to get an linker error 
> if the inlining didn't work for some reason because if we say
> inline we mean inline.
> 
> But that's long obsolete because the requirements of the C++ "template is 
> turing complete" people has broken inlining so badly (they want a lot of 
> inlining, but not too much inlining because otherwise their compile times 
> explode and the heuristics needed for making some of these pathologic cases 
> work seems to break a lot of other sane code)  that the kernel was forced to 
> define inline to __attribute__((always_inline)). And with that you get an 
> error if inlining
> fails. 
> 
> So the original purpose if extern inline is fulfilled by static inline now.
> However extern inline also doesn't hurt, it really makes no difference now.
> 
> -Andi
>  

-- 

                              Terrence

        ****************************************************
        | Terrence C. Miller      |  Sun Microsystems      |
        | terrence.miller@Sun.COM |  M.S. MPK16-303        |
        | 650-786-9192            |  16 Network Circle     |
        |                         |  Menlo Park, CA 94025  |
        ****************************************************



  parent reply	other threads:[~2005-09-06 20:56 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
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 [this message]
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=431E023E.3050301@Sun.COM \
    --to=terrence.miller@sun.com \
    --cc=ak@suse.de \
    --cc=bunk@stusta.de \
    --cc=discuss@x86-64.org \
    --cc=jakub@redhat.com \
    --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