Re: A simple question

David Love (dlove@nighton.net)
Fri, 09 Aug 2002 09:57:28 -0700


ed Wang wrote:
> I saw a lot of function define as _inline_ in Linux
> kernel. What does the term _inline_ mean? For the
> assembly inline statement, _asm_ should do the work.
>
> Thanks for the help!
>
> Ed
>

Feel free to correct me if I'm wrong...

From my understanding, inline has asolutely nothing to do with
assembly. When a function is declared as inline, you're basically
telling the compiler that anytime it runs into this function being
called, to replace that call with the body of the function (to eliminate
the overhead of making the function call). It's great for small, little
operations that are done extremely often.

-D.Love

-
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/