From: Adrian Bunk <bunk@stusta.de>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Michael Matz <matz@suse.de>,
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 21:00:14 +0200 [thread overview]
Message-ID: <20050905190014.GB3776@stusta.de> (raw)
In-Reply-To: <20050905184740.GF7403@devserv.devel.redhat.com>
On Mon, Sep 05, 2005 at 02:47:40PM -0400, Jakub Jelinek wrote:
> On Mon, Sep 05, 2005 at 08:00:05PM +0200, Adrian Bunk wrote:
> > 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.
>
> It does make sense and is different from
> static inline __attribute__((always_inline)).
> Try:
> static inline __attribute__((always_inline)) void foo (void) {}
> void (*fn)(void) = foo;
> vs.
> extern inline __attribute__((always_inline)) void foo (void) {}
> void (*fn)(void) = foo;
> In the former case, GCC will emit the out of line static copy of foo
> if you take its address, in the latter case either you provide foo
> function by other means, or you get linker error.
And we need the former case because in the kernel we do not have
out-of-line variants of the inline functions.
> Jakub
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
next prev parent reply other threads:[~2005-09-05 19: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
2005-09-05 18:47 ` Jakub Jelinek
2005-09-05 19:00 ` Adrian Bunk [this message]
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=20050905190014.GB3776@stusta.de \
--to=bunk@stusta.de \
--cc=ak@suse.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