Re: [discuss] [2.6 patch] include/asm-x86_64 "extern inline" -> "static inline"

From: Adrian Bunk (bunk_at_stusta.de)
Date: 09/05/05

  • Next message: Christoph Hellwig: "Re: [PATCH] Omnikey Cardman 4040 driver"
    Date:	Mon, 5 Sep 2005 21:00:14 +0200
    To: Jakub Jelinek <jakub@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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Christoph Hellwig: "Re: [PATCH] Omnikey Cardman 4040 driver"

    Relevant Pages

    • Re: 2.6.13-rc3-mm3
      ... > why there are undefined functions implemented that currently not in use? ... these are #if FOO where FOO isn't #define'd. ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [2.6 patch] drivers/pnp/: possible cleanups
      ... modular code will use any of them, ... Modular ISAPnP might be interesting in some cases, ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] relayfs redux, part 3
      ... array lookup and install the page. ... Also you're using foo == NULL a lot while we mostly use!foo. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: A users thoughts on the new dev. model
      ... >> when the stable tree wasn't. ... Andrew said explicitely in a mail to linux-kernel that he'd consider ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [2.6 patch] let W1 select NET
      ... > selecting the required dependencies. ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)