lkml.org 
[lkml]   [1996]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Problem: __inline__ functions in the kernel & cli()/sti() latency measurement
Date
From
> : > 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.


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.200 / U:0.280 seconds]
©2003-2014 Jasper Spaans. Advertise on this site