From: Tim Bird <tim.bird@am.sony.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: Is extern inline -> static inline OK?
Date: Fri, 06 Aug 2004 15:29:40 -0700 [thread overview]
Message-ID: <41140654.3060609@am.sony.com> (raw)
In-Reply-To: <ceul43$sbv$1@terminus.zytor.com>
H. Peter Anvin wrote:
> Followup to: <4112D32B.4060900@am.sony.com>
> By author: Tim Bird <tim.bird@am.sony.com>
> In newsgroup: linux.dev.kernel
>
>>Pardon my ignorance...
>>
>>Under what conditions is it NOT OK to convert "extern inline"
>>to "static inline"?
>>
>
>
> When the code is broken if it doesn't inline.
Thanks!
From what I have read, for either 'extern inline' or 'static inline'
the compiler is free to not inline the code. Is this wrong?
It is my understanding that...
In the 'static inline' case the compiler may create a function in the
local compilation unit. But in the 'extern inline' case an extern
non-inline function must exist. If the compiler decides not to inline
the function, and a non-inline function does not exist, you get a linker
error. Are you saying that, therefore, 'extern inline' functions are
used (without definition of extern non-inline functions to back them)
in order to guarantee that NO non-inline version of the function exists?
Or are you saying that the non-inline version of the function may
be written differently than the inline version?
Sorry to be so dense... I really appreciate your help.
=============================
Tim Bird
Architecture Group Co-Chair, CE Linux Forum
Senior Staff Engineer, Sony Electronics
E-mail: tim.bird@am.sony.com
=============================
next prev parent reply other threads:[~2004-08-06 22:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-06 0:39 Is extern inline -> static inline OK? Tim Bird
2004-08-06 0:58 ` H. Peter Anvin
2004-08-06 22:29 ` Tim Bird [this message]
2004-08-06 22:29 ` H. Peter Anvin
[not found] ` <20040806070027.GA20642@twiddle.net>
2004-08-06 18:57 ` Tim Bird
2004-08-07 2:41 ` Richard Henderson
[not found] <2q0Wb-2Tc-17@gated-at.bofh.it>
[not found] ` <2q1pe-3hq-17@gated-at.bofh.it>
[not found] ` <2qlo1-wO-37@gated-at.bofh.it>
2004-08-06 23:26 ` Andi Kleen
2004-08-07 1:26 ` 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=41140654.3060609@am.sony.com \
--to=tim.bird@am.sony.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
/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