Hi Sri,

On Fri, Sep 24, 2010 at 3:56 PM, Sri Ram Vemulpali wrote:
> Hi all,
>
>  I am encountering alot macros in the code. I did not understand what
> those macro means.
>
>  Can anyone explain them and the use of them putting them like that.
>
>   "unlikely"

This has to do with branch prediction. If the architecture that you're
building for supports branch prediction then this provides a hint to
say that the following test is unlikely to pass, so the branch
prediction will be setup to take the likely path.

>   "always_inline"  -- defined at the signature of the function.

Exactly what it says - always make the function an inline function.
The inline keyword is normally just a hint or suggestion to the
compiler, whereas the always_inline says that the function should
always be inlined, even if optimizations to perform function inlining
is disabled.
<http://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Function-Attributes.html>

>   "inline" -- I know inline keyword in compiler is used to place the
> code in to the caller function at the time of compiler, but why
> declared as macro

There are some CONFIG options which allow inline behaviour to be tweaked:
<http://cateee.net/lkddb/web-lkddb/OPTIMIZE_INLINING.html>

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to