Re: Looking for definition of inw and/or __inw on x86

Feuer (feuer@his.com)
Sat, 12 Sep 1998 14:26:15 -0400


 

barbacha@trill.cis.fordham.edu wrote:

> On 8 Sep 1998, H. Peter Anvin wrote:
>
> > Followup to:  <00ad01bddb0a$f525e820$04c809c0@Fake.Domain.com>
> > By author:    "Anthony Barbachan" <barbacha@trill.cis.fordham.edu>
> > In newsgroup: linux.dev.kernel
> > >
> > > I finally got the function definition.  The problem was that I was compiling
> > > my modules with just a gcc -c modname.c.  Since the inlined functions in
> > > asm/io.h are extern the compiler kept expecting a definition for __inw and
> > > __inwc.  This leads to another question, why in the world are the INLINED
> > > functions in asm-i386/io.h declared as extern?
> > >
> > > BTW, thanks to all those who helped.
> > >
> >
> > To keep gcc from generating a copy of the function body for every
> > single module just in case some luser compiles without -O.  It makes
> > the error manifest.  Read the gcc manual for more info.
> >
> >       -hpa
> > --
>
> ???  Isn't gcc suppose to replace any calls to inlined functions
> with the function body.  Inlined functions are suppose to be compiler
> friendly ways of doing things that previously had to be done with macros.
> If their is just one definition for the function, wouldn't this mean that
> it was working just like an ordinary function?
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/faq.html

Well, yes.  But inlining is not binding.  Just because a programmer says inline does
not guarantee inline.  In gcc, inlining is not done unless optimization is turned on
(or no optimization but inlining enabled as an override -finline or something like
that).
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/faq.html