public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kimball Murray <kmurray@redhat.com>
To: Jens Axboe <axboe@suse.de>
Cc: Adrian Bunk <bunk@stusta.de>, linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] include/linux/bio.h: "extern inline" -> "static inline"
Date: Wed, 27 Jul 2005 10:59:35 -0400	[thread overview]
Message-ID: <42E7A157.3080508@redhat.com> (raw)
In-Reply-To: <20050727142912.GJ6920@suse.de>

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

Jens Axboe wrote:

>On Tue, Jul 26 2005, Adrian Bunk wrote:
>  
>
>>"extern inline" doesn't make much sense.
>>    
>>
>
>Yep, thanks.
>
>  
>
IIRC, there was a time when the extern inline construct was used to 
catch cases where the compiler did not inline the function (you'd get a 
link error).  Seems like it still works.  Try building the attached 
files in each of the following ways:

gcc -o foo foo.c

    and

gcc -O2 -o foo foo.c

In the first case, you get a link error, because there is no inlining.

-kimball

[-- Attachment #2: foo.c --]
[-- Type: text/plain, Size: 102 bytes --]

#include "bar.h"

void foo(void) {
	bar();
}

int main(int argc, char *argv[])
{
	foo();
	return 0;
}

[-- Attachment #3: bar.h --]
[-- Type: text/plain, Size: 33 bytes --]

extern inline void bar(void)
{
}

  reply	other threads:[~2005-07-27 15:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-26 14:53 [2.6 patch] include/linux/bio.h: "extern inline" -> "static inline" Adrian Bunk
2005-07-27  1:49 ` Horst von Brand
2005-07-27 12:05   ` Adrian Bunk
2005-07-27 14:29 ` Jens Axboe
2005-07-27 14:59   ` Kimball Murray [this message]
2005-07-27 16:23     ` Adrian Bunk
  -- strict thread matches above, loose matches on Subject: below --
2005-07-31 22: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=42E7A157.3080508@redhat.com \
    --to=kmurray@redhat.com \
    --cc=axboe@suse.de \
    --cc=bunk@stusta.de \
    --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