Re: Problem: __inline__ functions in the kernel & cli()/sti() latency measurement

Andrew E. Mileski (aem@nic.ott.hookup.net)
Wed, 12 Jun 1996 01:13:19 -0400 (EDT)


> : > what is the point of using __inline__ functions ...
> : >
> : > __inline__ void foo( arg ) {
> :
> : Arg is evaluated once. You don't get burned by nasty macro expansion
> : side effects (especially since we nest inlines 3 deep in places).
>
> Also, you can't reutrn a value from a macro like that. You can from
> an inline function.

Note that GCC allows complex expressions like:
( { int a; a = something << 2 & 3; call_func(a) } )
Which allows you to make a macro that returns a value.

--
Andrew E. Mileski

mailto:aem@ott.hookup.net http://www.redhat.com/~aem/ Linux Plug-and-Play Project http://www.redhat.com/pnp/

Red Hat Software sponsors these pages - I have no other affilitation with Red Hat Software, and I have never used any of their products.